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:
43 $ sudo mount \-t tmpfs -o size=10M tmpfs /mnt/mytmpfs
49 filesystem has the following properties:
51 The filesystem can employ swap space when physical memory pressure
56 option can be used to specify an upper limit on the size of the filesystem.
57 (The default size is half of the available RAM size.)
58 The filesystem consumes only as much physical memory and swap space
59 as is required to store the current contents of the filesystem.
61 During a remount operation
62 .RI ( "mount\ \-o\ remount" ),
63 the filesystem size can be changed
64 (without losing the existing contents of the filesystem).
68 filesystem is unmounted, its contents are discarded (lost).
72 facility was added in Linux 2.4, as a successor to the older
74 facility, which did not provide limit checking or
75 allow for the use of swap space.
77 For a description of the mount options that may be employed when mounting a
82 In order for user-space tools and applications to create
84 filesystems, the kernel must be configured with the
90 filesystem supports extended attributes (see
94 extended attributes are not permitted.
96 An internal shared memory filesystem is used for
97 System V shared memory
99 and shared anonymous mappings
106 This filesystem is available regardless of whether
107 the kernel was configured with the
113 filesystem mounted at
115 as used for the implementation of POSIX shared memory
116 .RB ( shm_overview (7))
118 .RB ( sem_overview (7)).
120 The amount of memory consumed by all
122 filesystems is shown in the
133 facility was formerly called
138 .BR memfd_create (2),
143 The kernel source file
144 .IR Documentation/filesystems/tmpfs.txt .