/dev Linux filesystem

/dev

The /dev filesystem contains device files. Device files are used to access physical devices (such as hard drives, keyboards, and CPUs) and virtual devices (such as LVM devices, pseudo-terminals, and software RAID devices). The /dev filesystem is memory-based, not stored on the hard drive.


Key Files in /dev

  • /dev/sd* – Devices that begin with “sd” in the /dev directory are either SATA, SCSI, or USB devices. The device name /dev/sda refers to the first device, /dev/sdb refers to the second device, and so on. If a device has partitions, they are numbered starting with the value of 1.
  • /dev/sda1 – Example: the first partition of the first SATA, SCSI, or USB device.
  • /dev/hd* – Devices that begin with “hd” in the /dev directory are IDE-based devices. The device name /dev/hda refers to the first device, /dev/hdb refers to the second device, and so on. If a device has partitions, they are numbered starting with the value of 1.
  • /dev/hda1 – Example: the first partition of the first IDE-based device.
  • /dev/cdrom – Symbolic link that points to the first CD-ROM on the system.
  • /dev/dm* – Devices that begin with “dm” in the /dev directory are either software RAID or LVM devices. The device name /dev/dm-0 refers to the first device, /dev/dm-1 refers to the second device, and so on.
  • /dev/tty* – Devices that begin with “tty” in the /dev directory are terminal devices. The device name /dev/tty0 refers to the first device, /dev/tty1 refers to the second device, and so on.

Fair Use Source: B074WCK82D

Return to Determine and Configure Hardware Settings in Linux or Linux filesystem or Linux Topics

/proc Linux filesystem

/proc

The /proc filesystem provides information regarding processes, kernel features, and system hardware. The /proc filesystem is memory-based, not stored on the hard drive.

Key Files and Directories in /proc

  • /proc/cmdline – The kernel parameters that were used to boot the system.
  • /proc/cpuinfo – Information about the CPUs.
  • /proc/devices – A list of each character and block device file that the kernel has recognized.
  • /proc/mdstat – Information about RAID devices.
  • /proc/meminfo – Information about system memory.
  • /proc/modules – A list of all kernel modules currently loaded into memory.
  • /proc/partitions – The kernel’s partition table. Note: this may be different from what is in the hard disk’s partition table.
  • /proc/swaps – A list of all swap space recognized by the kernel.
  • /proc/vmstat – Virtual memory information.
  • /proc/sys – A directory that contains tunable kernel parameters.

Fair Use Source: B074WCK82D

Return to Determine and Configure Hardware Settings in Linux or Linux filesystem or Linux Topics

/sys Linux filesystem

/sys


The /sys filesystem is designed to provide important information regarding devices and buses that the kernel is aware of. The /sys filesystem is memory-based, not stored on the hard drive.


Key Files and Directories in /sys

  • /sys/block – Describes block devices, such as hard drives, CD-ROMs, DVDs, and RAID and LVM devices. Examples: sda (first SATA or USB drive), dm-0 (first LVM device) and sr0 (first CD-ROM or DVD).
  • /sys/bus – Describes devices that are attached to the system bus.
  • /sys/bus/cpu – Describes the CPUs that are attached to the system. Look under /sys/bus/cpu/devices to see details about each CPU.
  • /sys/bus/cpu/devices – Describes the USB devices that are attached to the system.

Fair Use Source: B074WCK82D

Return to Determine and Configure Hardware Settings in Linux or Linux filesystem or Linux Topics