What is a tmpfs and when is it used?
IntermediateConceptFilesystem Hierarchy, Inodes & Links
Answer
tmpfs is a filesystem that lives in the page cache (RAM, and can be swapped). It is used for /run, /dev/shm and often /tmp. Contents vanish on reboot. Limit it with size=:
sudo mount -t tmpfs -o size=512m tmpfs /mnt/scratch
df -h /dev/shm
Data written to tmpfs counts as shared memory (Shmem in /proc/meminfo), not as free memory.
More on Filesystem Hierarchy, Inodes & Links
Explain the purpose of the main top-level directories in the FHS.BeginnerWhat is the "/usr merge"?IntermediateWhat are /proc and /sys?BeginnerWhat is an inode? What does it store and what does it NOT store?BeginnerA disk shows free space but you get "No space left on device". Why?IntermediateWhat is a hard link?Beginner