RHCE - Part 1
Filesystem Device Nodes
- In Linux, most most devices accesed as a file.
- 2 types of devices: Character and Block devices
brw-rw---- 1 root floppy 2, 2 Apr 11 10:25 /dev/fd0
crw-rw---- 1 root uucp 4, 64 Apr 11 10:25 /dev/ttyS0
- Block devices: random access devices (storage...)
- hd[a-t]
- sd[a-z]+
- fd[0-7]
- md[0-31]
- loop[0-15]
- ram[0-19]
- Character devices: streams of data (comm ports...)
- tty[0-31] virtual consoles
- ttyS[0-9]+ serial ports
- lp[0-3]
- null 'blackhole'
- zero 'infinite'
- [u]random 'source of randomness'
- fb[0-31] framebuffer devices
- Symbolic links : /dev/cdrom --> /dev/hdd
- ls -l reveals type (first character)
- Devices have ownership (3D games, modem access)
- Each node has a Major and a Minor number
- Major number: indexes a particular DD in the Kernel
- Minor number: device driver parameter
- They are in /dev by convention (can be anywhere)
- Create a device with /bin/mknod
mknod cdrom b 22 64