Linux文件系统层级结构
本文总结了 WSL2 与 VMware 虚拟化冲突的解决方案。
常见的Linux目录名称基于 Filesystem Hierarchy Standard (FHS)。许多Linux发行版都保持与FHS的兼容性。
根文件系统/
在根目录(/)中需要以下目录或指向目录的符号链接。
| Directory | Description |
|---|---|
bin |
Essential command binaries, where many GNU user-level utilities are stored |
boot |
Static files of the boot loader |
dev |
Device files |
etc |
Host-specific system configuration |
lib |
Essential shared libraries and kernel modules |
media |
Mount point for removable media |
mnt |
Mount point for mounting a filesystem temporarily |
opt |
Add-on application software packages |
run |
Data relevant to running processes |
sbin |
Essential system binaries, where many GNU admin-level utilities are stored |
srv |
Data for services provided by this system |
tmp |
Temporary files |
usr |
User directory, a secondary directory hierarchy |
var |
Variable directory, for files that change frequently, such as log files |
home |
User home directories (optional) |
lib<qual> |
Alternate format essential shared libraries (optional) |
root |
Home directory for the root user (optional) |
/usr 目录结构
在/usr中需要以下目录或指向目录的符号链接。
| Directory | Description |
|---|---|
bin |
Most user commands |
lib |
Libraries |
local |
Local hierarchy (empty after main installation) |
sbin |
Non-vital system binaries |
share |
Architecture-independent data |
games |
Games and educational binaries (optional) |
include |
Header files included by C programs |
libexec |
Binaries run by other programs (optional) |
lib<qual> |
Alternate Format Libraries (optional) |
src |
Source code (optional) |
/var 目录结构
在/var中需要以下目录或指向目录的符号链接。
| Directory | Description |
|---|---|
cache |
Application cache data |
lib |
Variable state information |
local |
Variable data for /usr/local |
lock |
Lock files |
log |
Log files and directories |
opt |
Variable data for /opt |
run |
Data relevant to running processes |
spool |
Application spool data |
tmp |
Temporary files preserved between system reboots |
account |
Process accounting logs (optional) |
crash |
System crash dumps (optional) |
games |
Variable game data (optional) |
mail |
User mailbox files (optional) |
yp |
Network Information Service (NIS) database files (optional) |