The \/etc\/fstab file is a very important file on Linux systems. It contains information that allows the system to connect to disk partitions and determine where they should be mounted in the file system. While this file has played an important role over the years, its format has changed with the introduction of UUIDs and, on some systems, a more reliable file-system type.\nHere's an example of an \/etc\/fstab file on a Fedora system:\n$ cat \/etc\/fstab\n#\n# \/etc\/fstab\n# Created by anaconda on Fri Mar 12 12:26:55 2021\n#\n# Accessible filesystems, by reference, are maintained under '\/dev\/disk\/'.\n# See man pages fstab(5), findfs(8), mount(8) and\/or blkid(8) for more info.\n#\n# After editing this file, run 'systemctl daemon-reload' to update systemd\n# units generated from this file.\n#\nUUID=a9e33237-9114-44ae-afd5-8ddb231d301f \/ btrfs subvol=root 0 0\nUUID=15f42905-5897-4804-9c51-e6d5e169e6c2 \/boot ext4 defaults 1 2\n#UUID=a9e33237-9114-44ae-afd5-8ddb231d301f \/home btrfs subvol=home 0 0\nUUID=d867ced1-8d81-47c6-b299-3365ba8a02de \/home ext4 defaults\n\n\nEach line in the file (other than the comments) represents a file system and has six fields.\n\ndescribes the disk partition (more on the UUIDs below)\nidentifies the mount point\nshows the file system type (could be ext4, xfs, btrfs, f2fs, vfat, ntfs, hfsplus, tmpfs, sysfs, proc, iso9660, udf, squashfs, nfs, cifs or something else)\nprovides mount options\ndetermines if the file system might be dumped (0 = not) using the dump command (not often used)\ndetermines if file-system checking should be done at boot time (0 = not)\n\nThe btrfs\u00a0file system is a modern copy-on-write (CoW) filesystem for Linux that provides advanced features while also focusing on fault tolerance, repair and easy administration.\nThe \/etc\/fstab file shown above is unusual in that a new OS was just recently installed on \/dev\/sda and the \/home folder from the system before the upgrade (on a separate disk) was then remounted after the first reference to\u00a0\/home\u00a0was commented out.\nWhat are UUIDs?\nThose lengthy device identifiers that you see in \/etc\/fstab that are labeled UUID (universally unique identifier) are 128 bit (32 hex characters) long and arranged in an 8-4-4-4-12 character sequence. One way to view how the UUIDs connect with the device names (e.g., \/dev\/sda1) is to use the blkid command.\n$ sudo blkid\n\/dev\/sda1: UUID="15f42905-5897-4804-9c51-e6d5e169e6c2" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="01a5b4ea-01"\n\/dev\/sda2: LABEL="fedora_localhost-live" UUID="a9e33237-9114-44ae-afd5-8ddb231d301f" UUID_SUB="25ba7101-46bd-4eb8-87d4-91b404f93a4c" BLOCK_SIZE="4096" TYPE="btrfs" PARTUUID="01a5b4ea-02"\n\/dev\/sdb1: UUID="d867ced1-8d81-47c6-b299-3365ba8a02de" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="drive2" PARTUUID="5cf63888-8b4a-4d13-8453-4eb3a87c3e09"\n\/dev\/zram0: UUID="3b156a62-8b04-4725-b5ea-f0d817ff4109" TYPE="swap"\n\/dev\/sdc1: UUID="76E8-CACF" BLOCK_SIZE="512" TYPE="exfat" PARTUUID="fa2cb833-01"\n\nYou can also check out the by-uuid file to view the relationships:\n$ ls -l \/dev\/disk\/by-uuid\/\ntotal 0\nlrwxrwxrwx. 1 root root 10 Mar 12 13:46 15f42905-5897-4804-9c51-e6d5e169e6c2 -> ..\/..\/sda1\nlrwxrwxrwx. 1 root root 10 Mar 14 11:52 76E8-CACF -> ..\/..\/sdc1\nlrwxrwxrwx. 1 root root 10 Mar 12 13:46 a9e33237-9114-44ae-afd5-8ddb231d301f -> ..\/..\/sda2\nlrwxrwxrwx. 1 root root 10 Mar 12 13:46 d867ced1-8d81-47c6-b299-3365ba8a02de -> ..\/..\/sdb1\n\nThe 76E8-CACF device mounted as \/dev\/sdc1 is a USB drive that is temporarily in use.\nYou can get a feel for how Linux generates UUIDs by running uuidgen yourself. Check if it's on your system by typing "which uuidgen". These identifiers are for all practical purposes unique. When you enter the uuidgen command, you will get any of more than 3.40 \u00d7 1038 possible responses.\n$ uuidgen\n8e487c4e-6ec6-4c27-95c4-11ed8c3a9bbf\n$ uuidgen\n57f5c0e1-fb6c-43cb-a909-89fcd682939c\n\nUsing lsblk\nAnother convenient way to view file systems is with the lsblk command that provides a clear view of how file systems are related along with mount points, device sizes and major\/minor device numbers. This command makes the partitions on each drive easy to visualize.\n$ lsblk\nNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT\nsda 8:0 0 111.8G 0 disk\n\u251c\u2500sda1 8:1 0 1G 0 part \/boot\n\u2514\u2500sda2 8:2 0 110.8G 0 part \/\nsdb 8:16 0 465.8G 0 disk\n\u2514\u2500sdb1 8:17 0 434G 0 part \/home\nsdc 8:32 1 1.9T 0 disk\n\u2514\u2500sdc1 8:33 1 1.9T 0 part \/run\/media\/shs\/76E8-CACF\nsr0 11:0 1 1024M 0 rom\nzram0 252:0 0 2.9G 0 disk [SWAP]\n\nWrap-Up\nLinux systems provide a number of ways to view file systems. A few commands can help you understand the \/etc\/fstab file and the connections between disk partitions, file systems and UUIDs.