Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
linux_wiki:file_system_hierarchy [2015/11/16 22:34] billdozor created |
linux_wiki:file_system_hierarchy [2016/05/09 22:38] billdozor [Top Level Directories] |
||
---|---|---|---|
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 12: | Line 15: | ||
====== Top Level Directories ====== | ====== Top Level Directories ====== | ||
+ | |||
+ | EL7 = Enterprise Linux 7 (Red Hat, CentOS, Scientific) | ||
^ Directory | ^ Directory | ||
| / | Root directory; file system tree starts here | | | / | Root directory; file system tree starts here | | ||
- | | /bin | Executable programs needed to repair system; essential during boot | | + | | /bin | Executable programs needed to repair system; essential during boot; \\ EL7 symlinks /bin -> / |
| /boot | All files needed to boot the Linux kernel | | | /boot | All files needed to boot the Linux kernel | | ||
| /dev | Special/ | | /dev | Special/ | ||
| /etc | " | | /etc | " | ||
| /home | User local home directories | | | /home | User local home directories | | ||
- | | /lib and / | + | | /lib and / |
| /media and /mnt | Mount points for removable media and temporary file systems respectively | | /media and /mnt | Mount points for removable media and temporary file systems respectively | ||
| /opt | Add on or optional packages | | | /opt | Add on or optional packages | | ||
Line 26: | Line 31: | ||
| /root | Home directory for the root user | | | /root | Home directory for the root user | | ||
| /run | Process/ | | /run | Process/ | ||
- | | /sbin | Similar to /bin, except for system administration not used by regular users | | + | | /sbin | Similar to /bin, except for system administration not used by regular users; \\ EL7 symlinks /sbin -> / |
| /srv | Directory to use for data used by services (such as NFS, FTP, HTTP) | | | /srv | Directory to use for data used by services (such as NFS, FTP, HTTP) | | ||
| /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 37: | Line 42: | ||
====== Common Directories with Own Partition ====== | ====== Common Directories with Own Partition ====== | ||
- | It is common to separate | + | It is common to mount the following directories onto their own partition: |
- | * / => isolate the core OS away from the rest of the system. | + | ^ Directory |
- | | + | | |
- | | + | | / |
- | | + | | / |
- | | + | | / |
- | | + | | / |
+ | | / | ||
---- | ---- | ||
+ | ====== 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 | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | </ |