If /dev is suppose to list all the devices that is connected, like usb, hdd, webcam, how come on my ubuntu 15 VM I don't see a monitor? I am running the desktop edition so there should be a monitor.
Or maybe it is named something different?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
Device files on Unix systems in general are just one way for user programs to access device drivers; there isn't a one-to-one mapping from devices files to physical hardware, and not all hardware has a device file (or even a device driver). The kernel itself doesn't use device files to interact with hardware.
As pointed out by lcd047, network cards don't have device files at all. Programs interact with the network using APIs, e.g. the BSD socket API; even
ethtool uses a socket and
ioctl() to manipulate the network interface.
So when determining whether your monitor has a device file, it's useful to think of the ways programs interact with it. There aren't many tools which interact directly with a monitor... Programs display information on a monitor via a graphics card, and that does have device files:
/dev/fb* etc. But that's not the monitor. The only programs I know of which interact with a monitor directly are backlight control programs and
ddccontrol; the former generally use ACPI or laptop-specific devices (so the monitor's backlight is just a part of the system's power-usage model), and
ddccontrol uses the I²C bus whose devices appear as
/dev/i2c-* once the
i2c-dev module is loaded.