The term "ROOT" can be confusing, since there are at least 3 different meanings for it.
- "root" is the username of the required administration account on all Unix systems. root has a uid of 0.
- / is the root directory. The only directory on any Unix system that doesn't have a parent.
- /root is the home directory for the root account.
Most users think of su and sudo as a way to elevate their current privilege level to that of the root account, though both commands can do so very much more. People usually say they need 'root', which means they want to change to the privilege level of the root userid.
On Unix-like systems, including Linux systems, any disk object can be formatted with a file system and mounted to any directory. Any file system objects under that mount point, already existing, are hidden when the other file system is mounted on top.
- / - is the only required file system/partition/LV
- /boot - is often a file system/partition/LV used for booting Linux.
- /boot/EFI - is a FAT32 file system/partition used for UEFI files and boot information.
- /home - is often a separate file system/partition/LV which holds user HOME directories. This is a best practice to allow OS upgrades to only impact the / partition, leaving /home untouched.
For example, here's how mounts are handled on my laptop:
Code:
$ df -hT -x squashfs -x tmpfs -x devtmpfs
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-root ext4 25G 14G 9.3G 61% /
/dev/sda2 ext2 721M 185M 500M 27% /boot
/dev/sda1 vfat 511M 3.7M 508M 1% /boot/efi
/dev/mapper/ubuntu--vg-home--lv ext4 74G 21G 51G 29% /home
/dev/mapper/ubuntu--vg-stuff ext4 99G 367M 93G 1% /stuff
lxd/containers/devoted-sunbird zfs 15G 421M 14G 3% /var/lib/lxd/containers/devoted-sunbird.zfs
istar:/D nfs 3.5T 3.5T 41G 99% /D
Don't worry, the options to df above are just to hide things that show up, but aren't real storage.
My example above shows different file systems, ext2/4, vfat, zfs, nfs and how things can be mounted for different purposes at both top directories like /boot, /stuff, /home and deeper locations like /var/lib/lxd/containers/devoted-sunbird.zfs. It also shows how NFS (network file systems) are shown as local storage when mounted with the last line. I use LVM too.
There's only 1 local disk (500GB SSD) and 1 remote disk in output above.
Fun stuff. Extremely flexible.
Bookmarks