Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux_wiki:file_system_hierarchy [2015/11/17 22:57] billdozor [Common Directories with Own Partition] |
linux_wiki:file_system_hierarchy [2019/05/25 23:50] (current) |
||
---|---|---|---|
Line 4: | Line 4: | ||
Some of the most common top level directories in the Linux file system. | Some of the most common top level directories in the Linux file system. | ||
+ | |||
+ | **Checklist** | ||
+ | * Distro(s): Any | ||
**Sources** | **Sources** | ||
Line 32: | Line 35: | ||
| /sys | To interface with hardware devices managed by the kernel | | | /sys | To interface with hardware devices managed by the kernel | | ||
| /tmp | Temporary files that could be deleted without warning during boot | | | /tmp | Temporary files that could be deleted without warning during boot | | ||
- | | /usr | Directory containing sub directories with program files, libraries, and documentation. Typically mimics the contents of /. Not required during boot. | | + | | /usr | Directory containing sub directories with program files, libraries, and documentation. Typically mimics the contents of /. EL6: Not required during boot. EL7: Important directory contents has been relocated here; now required during boot. | |
| /var | Files that can change dynamically (log files, mail, and spool files) | | | /var | Files that can change dynamically (log files, mail, and spool files) | | ||
Line 44: | Line 47: | ||
| / | isolate the core OS away from the rest of the system | | | / | isolate the core OS away from the rest of the system | | ||
| /boot | isolate kernel boot images, cannot be LVM | | | /boot | isolate kernel boot images, cannot be LVM | | ||
- | | /home | isolate user data from the rest of the system | | + | | /home | isolate user data from the rest of the system; usually to allocate more storage space and preserve user data during upgrades |
| /tmp | isolate world writeable /tmp to give more secure mount options | | | /tmp | isolate world writeable /tmp to give more secure mount options | | ||
| /var | isolate other variable data that could grow from affecting the rest of the system. (yum cache, common place for applications to write to) | | | /var | isolate other variable data that could grow from affecting the rest of the system. (yum cache, common place for applications to write to) | | ||
Line 51: | Line 54: | ||
---- | ---- | ||
+ | ====== View Mounts ====== | ||
+ | |||
+ | Different ways to see file system mounts. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Find Mounts ===== | ||
+ | |||
+ | The " | ||
+ | |||
+ | <code bash> | ||
+ | [root@srv01 ~]# findmnt | ||
+ | TARGET | ||
+ | / / | ||
+ | ├─/ | ||
+ | │ └─/ | ||
+ | ├─/ | ||
+ | │ ├─/ | ||
+ | │ ├─/ | ||
+ | │ │ ├─/ | ||
+ | │ │ ├─/ | ||
+ | │ │ ├─/ | ||
+ | │ │ ├─/ | ||
+ | │ │ ├─/ | ||
+ | │ │ ├─/ | ||
+ | │ │ ├─/ | ||
+ | │ │ ├─/ | ||
+ | │ │ ├─/ | ||
+ | │ │ └─/ | ||
+ | │ ├─/ | ||
+ | │ ├─/ | ||
+ | │ └─/ | ||
+ | ├─/ | ||
+ | │ ├─/ | ||
+ | │ ├─/ | ||
+ | │ ├─/ | ||
+ | │ └─/ | ||
+ | ├─/ | ||
+ | ├─/ | ||
+ | ├─/ | ||
+ | ├─/ | ||
+ | ├─/ | ||
+ | ├─/ | ||
+ | └─/ | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Mount ===== | ||
+ | |||
+ | The " | ||
+ | |||
+ | <code bash> | ||
+ | [root@srv01 ~]# mount -t xfs,ext4 | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | /dev/sda1 on /boot type xfs (rw, | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== df ===== | ||
+ | |||
+ | " | ||
+ | <code bash> | ||
+ | [root@srv01 ~]# df -hT | ||
+ | Filesystem | ||
+ | / | ||
+ | devtmpfs | ||
+ | tmpfs | ||
+ | tmpfs | ||
+ | tmpfs | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | </ |