In all operating system we are able to enable or disable hardware by configuring them. We can do same in Linux system from control center. In this blog we are going learn how to disable USB drive with the help of Linux file system. To do this we must know the file system used by Linux. Because Linux uses file to configure every hardware connected to it. We get all driver files in /dev directory. The programming module of every driver is located at /sys/modules. From this module we are able to configure hardware changing in programming module. To disable the USB we have to look for USB module in same directory.
USB module is located at /sys/modules/usbcore, from this module we are able to configure the USB device. We can get all information of USB. This module contain all information regarding USB such as speed, buffer-size, version number, etc. There are lot of files that can be configured, but to do this we require root authority. We are able to read files from normal account but can not edit them. Now let's check our USB version number: Open file “/sys/module/usbcore/drivers/usb:usb/usb2/version”.
USB module is located at /sys/modules/usbcore, from this module we are able to configure the USB device. We can get all information of USB. This module contain all information regarding USB such as speed, buffer-size, version number, etc. There are lot of files that can be configured, but to do this we require root authority. We are able to read files from normal account but can not edit them. Now let's check our USB version number: Open file “/sys/module/usbcore/drivers/usb:usb/usb2/version”.