0

At the time of Linux installation, i have mentioned only one filesystem (/dev/sda1 -> ext4 -> / ). But for dev, run, proc, sys - Linux is creating addition FS which is inferable from mount.

$ mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,noexec,relatime,size=12138104k,nr_inodes=3034526,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=2433824k,mode=755)
/dev/sda4 on / type ext4 (rw,relatime,errors=remount-ro)
...

I am aware that /proc is a Virtual FS and is in memory and not on any HDD/SSD. Could some one explain what is the case with /dev, /run and /sys. Do they exist on HDD (if so what is there location if it can be meaningfully traced).

Based on already asked Q - Why inode numbers of /dev and /run are same as that of /?

samshers
  • 668
  • 1
  • 8
  • 20
  • Does this answer your question? [Where does tmpfs come from and how is it mounted](https://unix.stackexchange.com/questions/522694/where-does-tmpfs-come-from-and-how-is-it-mounted) – muru Sep 03 '20 at 07:49
  • And also: https://unix.stackexchange.com/questions/236533/sysfs-and-devtmpfs - "sysfs is a ram-based filesystem", "Devtmpfs lets the kernel create a tmpfs instance called devtmpfs" – muru Sep 03 '20 at 07:51

1 Answers1

5

The mount output lists the file system types:

  • /dev is a devtmpfs (a virtual file system exporting device nodes)
  • /run is a tmpfs (a virtual memory file system)
  • /sys is a sysfs (a virtual file system exporting kernel objects)

All of these live in memory, not on your drives. man 5 proc tmpfs sysfs will show you the documentation for these, or you can follow the links above.

Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164