Linux File System Overview 1.3.2 . 1 File System Hierarchy
Before getting familiar with commands, let's get familiar with them.LinuxFile System Structure.
AndWindowsDisk shards in the system (C:,D :...) Different management methods,
LinuxThe file system is 1.3.6 As shown in/"Is the root tree structure.
Ubuntu LinuxFile System directory structure followsLinux filesystem Hierarchy Standard (FHS,
File System Hierarchy Standard ).
FHSOfficial Website:Http://www.pathname.com/fhs/ "/"Is called the root directory,
In other words, directories are subdirectories.
Figure1.3.5Ubuntu LinuxDirectory structure
The directories are briefly described as follows:
Bin Basic binary file
BootKernel andBootloaderFile
Dev Device Files
Etc Host configuration and initialization script file directory
LibShared Library, kernel module, header file, etc.
MediaYou can remove a mount point (optical disc,UDisks)
MNTTemporary mount point of the file system
OPTAppend ApplicationProgramSoftware Package
SbinSystem Management Program binary file
TMPTemporary File directory
RootRootThe main directory of the userRootLog on to the directory
HomeThe user's main directory,RootOther users will create a home directory in this directory as the user name.
ProcAverageProcfsThe file system is mounted to this directory,ProcfsA Virtual File System,
The user program can interact with the memory through this file system to view the Kernel Status and dynamically change the memory parameters.
SysUsuallySysfsMounted to this directory
USRSecondary importanceHierarchical directory
/Usr/binStandard Commands for users and administrators
/Usr/includeSame file directory
/Usr/libLibrary files
VaRVariable data
/Var/CacheCache directory
/Var/gamesGame data
/Var/libVarious status data
/Var/lockLock record
/Var/logLog records
/Var/mailEmail
/Var/opt/OPTDirectory variable data
/Var/spoolThe queue directory that stores emails and print tasks.
LinuxFor more information about the directory structure, seeFHS 2.3.
1.3.2 . 2 Relative Path, absolute path, and file type
LinuxIn the file system, directories are divided into absolute paths and relative paths./"Directory name,
If a path name/It is an absolute path, for example:/Usr/local/binIs the absolute path;
The relative path is a path name starting from the current path.
"." Indicates the current directory
".." Parent directory of the current directory
"~" Indicates the user's home directory, as shown in figureVim ~ /. BashrcOpen. BashrcFile
LinuxFiles in the system are divided into common files (including text files, binary program files, data files, and so on ),
Connection Files (symbolic connections, hard connections), socket files, MPs queue files, and device files.
IsLinuxIn the system, file naming should be avoided as much as possible*? > <;&! [] | \'"'(){}And other special characters,
Because these characters areLinuxMay have special meanings in the command line, which is easy to cause confusion, so try to avoid
.
LinuxThe file name in the system is "."When this file is activated, it is a hidden file, as shown in figure. Bashrc