1 .\" Copyright (c) 2016 by Michael Kerrisk <mtk.manpages@gmail.com>
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date. The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein. The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
25 .TH TMPFS 5 2017-05-03 "Linux" "Linux Programmer's Manual"
27 tmpfs \- a virtual memory filesystem
31 facility allows the creation of filesystems whose contents reside
33 Since the files on such filesystems typically reside in RAM,
34 file access is extremely fast.
36 The filesystem is automatically created when mounting
37 a filesystem with the type
39 via a command such as the following:
41 $ sudo mount \-t tmpfs -o size=10M tmpfs /mnt/mytmpfs
45 filesystem has the following properties:
47 The filesystem can employ swap space when physical memory pressure
52 option can be used to specify an upper limit on the size of the filesystem.
53 (The default size is half of the available RAM size.)
54 The filesystem consumes only as much physical memory and swap space
55 as is required to store the current contents of the filesystem.
57 During a remount operation
58 .RI ( "mount\ \-o\ remount" ),
59 the filesystem size can be changed
60 (without losing the existing contents of the filesystem).
64 filesystem is unmounted, its contents are discarded (lost).
68 facility was added in Linux 2.4, as a successor to the older
70 facility, which did not provide limit checking or
71 allow for the use of swap space.
73 For a description of the mount options that may be employed when mounting a
78 In order for user-space tools and applications to create
80 filesystems, the kernel must be configured with the
86 filesystem supports extended attributes (see
90 extended attributes are not permitted.
92 An internal shared memory filesystem is used for
93 System V shared memory
95 and shared anonymous mappings
102 This filesystem is available regardless of whether
103 the kernel was configured with the
109 filesystem mounted at
111 as used for the implementation of POSIX shared memory
112 .RB ( shm_overview (7))
114 .RB ( sem_overview (7)).
116 The amount of memory consumed by all
118 filesystems is shown in the
129 facility was formerly called
136 The kernel source file
137 .IR Documentation/filesystems/tmpfs.txt .