
SunOS 4 includes what is most likely the earliest implementation of tmpfs it first appeared in SunOS 4.0 in late 1987, together with new orthogonal address space management that allowed any object to be memory mapped. One of the earliest was developed by Sun Microsystems for SunOS, and other operating systems like the BSDs and Linux provided their own. There are several independent variants of the tmpfs concept. Temporary system files such as firmware variables are stored in /sys Implementations Debian) do not have a tmpfs mounted on /tmp by default in this case, files under /tmp will be stored in the same file system as /.Īnd on almost all Linux distributions, a tmpfs is mounted on /run/ or /var/run/ to store temporary run-time files such as PID files and Unix domain sockets. This can be observed with df as in this example:įilesystem Size Used Avail Use% Mounted on Many Unix distributions enable and use tmpfs by default for the /tmp branch of the file system or for shared memory. The memory used by tmpfs grows and shrinks to accommodate the files it contains. On reboot, everything in tmpfs will be lost. A similar construction is a RAM disk, which appears as a virtual disk drive and hosts a disk file system.Įverything stored in tmpfs is temporary in the sense that no files will be directly created on non-volatile storage such as a hard drive (although swap space is used as backing store according to the page replacement policy of the operating system). It is intended to appear as a mounted file system, but data is stored in volatile memory instead of a persistent storage device. Tmpfs (short for Te mporary File System) is a temporary file storage paradigm implemented in many Unix-like operating systems.
