M BUZZ CRAZE NEWS
// general

How to understand which device is which in the /dev directory

By Jessica Wood

I am new in UNIX/Linux programming. I need a clear reference of each file in /dev directory and which file refers to which devices. I have read many posts but its not only confusing but also sharing very little data. Is there any online documentation or any os internal file that can give clear information about those device files?

For example

/proc/bus/input/devices

this file give some information about all input devices .

1 Answer

The /dev directory in UNIX is generally a folder that contains device files, and is how the O/S contacts the components on the system. Some of these are going to be actual devices, like a hard disk, network card, usb port, keyboard, or mouse. Some are "virtual" devices that are used for special purposes, such as sending output to /dev/null file, or a pseudo random number generator (/dev/random).

If you have the "lshw" package installed, that will list the actual hardware info, along with some device names. There is also lspci, lsmem, lscpu, lsusb, and probably a few others to help identify components on the system.

But to my knowledge, there is no single document or help file that will explain what all the files in /dev directory are used for. In general, I'd suggest if there are any you are curious about, just do a browser search for Ubuntu /dev/{device-filename} and odds are good someone has a description of the file's purpose.

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy