Devices

Filesystem

All the devices connected to the system form one big filesystem. The base directory is called root and it's denoted with a single slash: /

Device Nodes

A device node is a special file type in Linux that represents a device. All device nodes are located under: /dev

The mknod utility is used to create a device node on a file system.

mknod /dev/node_name {b|u|c|p} {MAJOR} {MINOR}

  • {b|u|c|p}: Device type
  • {MAJOR}: The number of the device driver registered in the kernel
  • {MINOR}: A minor number to be passed to the device driver to recognize different devices using the same driver.
letter type
b block (buffered) special file
u, c character (unbuffered) special file
p create a FIFO

Mount Point

A mount point is a directory (typically an empty one) in the currently accessible filesystem on which an additional filesystem is mounted (i.e., mapped).

A filesystem is a hierarchy of directories (also referred to as a directory tree) that is used to organize files on a computer system. On Linux and other Unix-like operating systems, at the very top of this hierarchy is the root directory, which contains all other directories on the system, inclusive of their subdirectories, etc. A variant of this definition is the part of the entire hierarchy of directories (i.e., of the directory tree) that is located on a single partition or disk. A partition is a logically independent section of a hard disk drive (HDD).

The mount point becomes the root directory of the newly added filesystem, and that filesystem becomes accessible from that directory. Any original contents of that directory become invisible and inaccessible until the filesystem is unmounted (i.e., detached from the main filesystem).

The default mount points for a system are the directories in which filesystems will be automatically mounted unless told by the user to do otherwise: /etc/fstab.

To see which device maps to which mount point there are two quick ways:
cat /etc/fstab
and
df

linux/devices.txt · Last modified: 2010/08/10 (external edit)
CC Attribution-Noncommercial-Share Alike 3.0 Unported
Valid CSS Driven by DokuWiki Recent changes RSS feed Valid XHTML 1.0