device types
0%

Devices · Lesson 2

device types

Learn to distinguish character and block device nodes from pipes, sockets, and regular filesystem objects.

The first character in an ls -l mode identifies an object's filesystem type. Under /dev, character and block special files are device nodes. Pipes and Unix-domain socket nodes can also appear there, but they are interprocess communication objects rather than hardware device nodes.

$ ls -l /dev/null /dev/sda /run/systemd/journal/dev-log /tmp/example-fifo
crw-rw-rw- 1 root root 1, 3 ... /dev/null
brw-rw---- 1 root disk 8, 0 ... /dev/sda
srw-rw-rw- 1 root root      ... /run/systemd/journal/dev-log
prw------- 1 user user      ... /tmp/example-fifo