# Standard system disk - root partition (/) using ext4
UUID=f7d9c025-da7f-42c7-a051-27ef5ba db2e3 / ext4 defaults 0 1
# Swap partition
UUID=4e2d4e80-9ae1-4f0f-8e2a-81d3a5c21dc1 none swap sw 0 0
# Home partition on a separate disk
UUID=8868abf6-88c5-4a83-98b8-55d7f400d5cf /home ext4 defaults 0 2
# Mount Windows NTFS partition with read-write access
UUID=2AC873B6C8737F1D /mnt/windows ntfs-3g uid=1000,gid=1000,dmask=027,fmask=137 0 0
# Mount a network share (NFS)
192.168.1.100:/shared /mnt/nfs nfs rw,sync,hard,intr 0 0
# Mount a CD/DVD drive
/dev/cdrom /media/cdrom iso9660 ro,user,noauto,unhide 0 0
# Mount a USB drive by its label
LABEL=USBDRIVE /media/usb vfat rw,user,noauto,exec,utf8 0 0
# Bind mount (making a directory appear in another location)
/var/www /home/user/www none bind 0 0
# Mount a tmpfs (RAM disk) for temporary files
tmpfs /tmp tmpfs size=2G,mode=1777 0 0
# Mount an SMB/CIFS Windows share
//192.168.1.100/share /mnt/samba cifs username=user,password=pass,iocharset=utf8,uid=1000,gid=1000 0 0
In /etc/fstab
, the last two numbers have specific meanings:
- The second-to-last number (5th field) is for dump utility (0 disables, 1 enables)
- The last number (6th field) is the fsck order:
- 0 = do not check
- 1 = check first (typically used for root filesystem /)
- 2 = check after root filesystem
The standard practice is:
- Use
1
for the root partition (/) - Use
2
for all other regular partitions - Use
0
for special filesystems (proc, tmpfs, swap)