обзор иерархии файловой системы (File system hierarchy overview)
GENERAL STRUCTURE
/
The file system root. Usually writable, but this is not
required. Possibly a temporary file system ("tmpfs"). Not
shared with other hosts (unless read-only).
/boot/
The boot partition used for bringing up the system. On EFI
systems, this is possibly the EFI System Partition (ESP),
also see systemd-gpt-auto-generator(8). This directory is
usually strictly local to the host, and should be considered
read-only, except when a new kernel or boot loader is
installed. This directory only exists on systems that run on
physical or emulated hardware that requires boot loaders.
/efi/
If the boot partition /boot/ is maintained separately from
the EFI System Partition (ESP), the latter is mounted here.
Tools that need to operate on the EFI system partition should
look for it at this mount point first, and fall back to
/boot/ — if the former doesn't qualify (for example if it is
not a mount point or does not have the correct file system
type MSDOS_SUPER_MAGIC
).
/etc/
System-specific configuration. This directory may or may not
be read-only. Frequently, this directory is pre-populated
with vendor-supplied configuration files, but applications
should not make assumptions about this directory being fully
populated or populated at all, and should fall back to
defaults if configuration is missing.
/home/
The location for normal user's home directories. Possibly
shared with other systems, and never read-only. This
directory should only be used for normal users, never for
system users. This directory and possibly the directories
contained within it might only become available or writable
in late boot or even only after user authentication. This
directory might be placed on limited-functionality network
file systems, hence applications should not assume the full
set of file API is available on this directory. Applications
should generally not reference this directory directly, but
via the per-user $HOME environment variable, or via the home
directory field of the user database.
/root/
The home directory of the root user. The root user's home
directory is located outside of /home/ in order to make sure
the root user may log in even without /home/ being available
and mounted.
/srv/
The place to store general server payload, managed by the
administrator. No restrictions are made how this directory is
organized internally. Generally writable, and possibly shared
among systems. This directory might become available or
writable only very late during boot.
/tmp/
The place for small temporary files. This directory is
usually mounted as a "tmpfs" instance, and should hence not
be used for larger files. (Use /var/tmp/ for larger files.)
This directory is usually flushed at boot-up. Also, files
that are not accessed within a certain time may be
automatically deleted.
If applications find the environment variable $TMPDIR set,
they should use the directory specified in it instead of
/tmp/ (see environ(7) and IEEE Std 1003.1
[4] for details).
Since /tmp/ is accessible to other users of the system, it is
essential that files and subdirectories under this directory
are only created with mkstemp(3), mkdtemp(3), and similar
calls. For more details, see Using /tmp/ and /var/tmp/
Safely
[5].