How to disable Usb port?
7,110
Solution 1
You could try this, although may cause other issues:
sudo sh -c 'echo "blacklist usb-storage" >> /etc/modprobe.d/blacklist.conf'
Source:
Solution 2
Just rename storage to storage-old:
mv /lib/modules/3.2.0-35-generic-pae/kernel/drivers/usb/storage /lib/modules/3.2.0-35-generic-pae/kernel/drivers/usb/storage-old
Related videos on Youtube
Author by
Sumit Singh
Currently a software developer at Flipkart, previously worked in Infineon Technologies, India. I'm specialized in Java and eclipse plugin development. I like Ubuntu, open source philosophy, knowledge sharing, finding innovative solutions, continuous improvement. I tweet here, blog here, and Linkedin Profile. Thanks for visiting my Profile. SOreadytohelp
Updated on September 18, 2022Comments
-
Sumit Singh over 1 year
I am using Ubuntu 10.10. I want to disable my
usb port
due to some resign.
so how i can disable myusb port
and after that how i can enable it..-
david6 about 12 yearsDo you want to disable USB storage devices? Why are you still using such an old Ubuntu?
-
RobotHumans about 12 yearsMy answer only applies for a specific set of circumstances. Why is it you want to disable a usb port, for what type of device, and are you trying to disable all usb ports or just one?
-
Chan-Ho Suh about 12 years@david6 10.10 is not that old. Less than two years ago, after all. Some institutions are still using 8.04, which is a LTS; desktop support for it just ended last year, with server support ending now.
-
Lekensteyn about 12 yearsDefine "disable". Do you want to remove the power or make Ubuntu ignore any USB device?
-
-
Dmitrii K. about 11 yearschange the kernel revision with the kernel ver. you have
-
david6 over 10 yearsEdit file
/etc/modprobe.d/blacklist.conf
, to remove line which that this added. ie. "blacklist usb-storage". You could use vim or gedit, from the command line. eg.sudo vim /etc/modprobe.d/blacklist.conf
-
Sukupa91 over 10 yearsthanks , yeah it will work for sure , but cant we do it directly via terminal
-
Shubshub about 8 years@Sushantp606 We can!
awk '!/pattern/' file > /tmp/temp && sudo mv /tmp/temp /etc/modprobe.d/blacklist.conf