mac文件体系
新装的软件应该放在哪个目录下?
以前安装的的软件,应该在哪个目录下查找?
1. 域分类
- user domain
- local domain
- system domain
- network domain
2. 文件夹分类
2.1. Standard folders
| Directory | Description |
|---|---|
| /Applications | Self explanatory, this is where your Mac’s applications are kept |
| /Developer | The Developer directory appears only if you have installed Apple’s Developer Tools, and no surprise, contains developer related tools, documentation, and files. |
| /Library | Shared libraries, files necessary for the operating system to function properly, including settings, preferences, and other necessities (note: you also have a Libraries folder in your home directory, which holds files specific to that user). |
| /Network | largely self explanatory, network related devices, servers, libraries, etc |
| /System | System related files, libraries, preferences, critical for the proper function of Mac OS X |
| /Users | All user accounts on the machine and their accompanying unique files, settings, etc. Much like /home in Linux |
| /Volumes | Mounted devices and volumes, either virtual or real, such as hard disks, CD’s, DVD’s, DMG mounts, etc |
2.2. Posix or Unix directories
| Directory | Description |
|---|---|
| / | Root directory, present on virtually all UNIX based file systems. Parent directory of all other files |
| /bin | Essential common binaries, holds files and programs needed to boot the operating system and run properly |
| /etc | Machine local system configuration, holds administrative, configuration, and other system files |
| /dev | Device files, all files that represent peripheral devices including keyboards, mice, trackpads, etc |
| /usr | Second major hierarchy, includes subdirectories that contain information, configuration files, and other essentials used by the operating system |
| /sbin | Essential system binaries, contains utilities for system administration |
| /tmp | Temporary files, caches, etc |
| /var | Variable data, contains files whose contents change as the operating system runs |
2.3. Other directories
- /Volumes
- /cores
- /private
3. 组合结果
| macOS Standard folders:例如 /Library | Posix or Unix directories:例如 /bin | Other directories:例如 /Volumes | |
|---|---|---|---|
| network domain | |||
| system domain | /System/Library | /bin | |
| user domain | /Library | /usr/bin | |
| local domain | /Users/username/Library | /usr/local/bin |
4. 值得注意的文件夹
| 一级路径 | 二级路径 | 介绍 | 举例 | |
|---|---|---|---|---|
| /Users/xxx | /Users/xxx | 各种用户常用的文件夹 | /Users/xxx/Desktop 是桌面文件夹 | |
| /Users/xxx/Library | 各种应用的缓存、插件、数据 | /Users/chenzz/Library/Mail 保存邮件缓存 | ||
| /Users/xxx/Library/Containers | 各种应用的缓存 | /Users/chenzz/Library/Containers/com.tencent.WeWorkMac 保存企业微信的缓存 | ||
| /Users/xxx/Library/Application Support | 各种应用的插件 | /Users/chenzz/Library/Application Support/JetBrains 保存IDEA的各种插件信息 | ||
| /usr/local | /usr/local/bin | 常用命令的文件夹 | /usr/local/bin/docker-compose 是快捷方式,指向 /Applications/Docker.app/Contents/Resources/bin/docker-compose | |
| /usr/local/Cella | brew下载各种软件的路径 | |||
| /Library | /Java/JavaVirtualMachines | 各种JDK的安装路径 | ||
| /Application Surpport/BootCamp | bootcamp下载windows插件的路径 |




5. 参考
https://difyel.com/apple/macos/macos-directory-structure/#Standard_folders