I am using Ubuntu 10.10. I want to disable my usb port
due to some resign.
so how i can disable my usb port
and after that how i can enable it..
-
Do you want to disable USB storage devices? Why are you still using such an old Ubuntu?– david6Apr 23, 2012 at 5:15
-
My 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?– RobotHumansApr 23, 2012 at 8:19
-
@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.– Chan-Ho SuhApr 23, 2012 at 20:52
-
Define "disable". Do you want to remove the power or make Ubuntu ignore any USB device?– LekensteynApr 23, 2012 at 22:09
4 Answers
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
You could try this, although may cause other issues:
sudo sh -c 'echo "blacklist usb-storage" >> /etc/modprobe.d/blacklist.conf'
Source:
-
-
1Edit 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
– david6Nov 30, 2013 at 9:16 -
thanks , yeah it will work for sure , but cant we do it directly via terminal– Sukupa91Nov 30, 2013 at 9:23
-
@Sushantp606 We can!
awk '!/pattern/' file > /tmp/temp && sudo mv /tmp/temp /etc/modprobe.d/blacklist.conf
– user423626Mar 26, 2016 at 16:42
You're not being very specific.
List the USB modules currently loaded:
lsmod | grep usb
You can unload the modules with
sudo rmmod usb_storage # for disks
Be carefull, you can easily lock yourself out if you're using USB keyboard/mouse and remove the usbhid module.
This is not strictly an Ubuntu or Linux solution, but you could go into the bios of the computer and disable the usb ports from there.
Some computers will allow you to select which ports to disable (HP).
You can then also password protect the bios to ensure they are not just switched on again.
You may also want to pay attention to what usb input devices (keyboard / mouse) you have before disabling usb.