tmpfs
also: ramfs, virtual memory filesystem
tmpfs is a virtual filesystem that stores data in RAM (and swap if needed) rather than on disk, providing fast temporary storage that disappears when unmounted or the system reboots.
tmpfs is a RAM-based filesystem commonly used for temporary files and caches in Linux systems. Unlike disk-based filesystems, data stored in tmpfs exists entirely in memory, making it extremely fast for read and write operations.
By default, most Linux systems mount tmpfs at /tmp, /run, and /dev/shm. When the system shuts down or the filesystem is unmounted, all data is lost. This makes tmpfs ideal for temporary files that don't need permanent storage, such as session data, lock files, or temporary build artifacts.
You can create custom tmpfs mounts with mount -t tmpfs tmpfs /mnt/tmpfs and control their maximum size to prevent them from consuming all available RAM. For example: mount -t tmpfs -o size=512M tmpfs /mnt/tmpfs creates a 512 MB tmpfs mount.