Linux – the difference between /dev/usb, /proc/bus/usb and /sys/bus/usb

linuxusb

In terms of content, what is the difference between these 4 folders?

  • /dev/usb
  • /proc/bus/usb
  • /sys/bus/usb
  • /sys/class/usb_device

I found many symlinks between those folders, many redundant information. More generically what is the idea/purpose in the first place of each of these folders?

Best Answer

Take from the wikipedia:

/dev Essential devices, e.g., /dev/null.

/proc Virtual filesystem documenting kernel and process status as text files, e.g., uptime, network. In Linux, corresponds to a procfs mount.

/sys Modern Linux distributions include a /sys directory as a virtual filesystem (sysfs, comparable to /proc, which is a procfs), which stores and allows modification of the devices connected to the system, whereas many traditional UNIX and Unix-like operating systems use /sys as a symbolic link to the kernel source tree

Related Question