Linux Tutorials - Herong's Tutorial Examples - v5.44, by Herong Yang
/etc/mtab and /etc/fstab Files
This section provides a quick introduction on /etc/mtab and /etc/fstab. One holds currently mounted file systems. The other holds file systems to be mounted at boot time.
There are two system files on a Linux computer that hold important information about file systems: /etc/mtab and /etc/fstab.
What Is /etc/mtab File? /etc/mtab is a system file that contains a list of currently mounted file systems and their mounting parameters.
For example, here is what I have in /etc/mtab on my Ubuntu computer.
herong$ head /etc/mtab rootfs / rootfs rw 0 0 proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0 tmpfs /dev tmpfs rw,nosuid,size=65536k,mode=755 0 0 devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,ptmxmode=666 0 0 sysfs /sys sysfs ro,nosuid,nodev,noexec,relatime 0 0 cgroup /sys/fs/cgroup/pids cgroup ro,nosuid,nodev,noexec,relatime,pids 0 0 shm /dev/shm tmpfs rw,nosuid,nodev,noexec,relatime,size=65536k 0 0 /dev/sda6 /boot ext4 rw,seclabel,relatime 0 0 //192.168.1.6/share /mnt/share cifs rw,relatime,vers=3.1.1,cache=strict,... nsfs /run/docker/netns/bfb24f16e35e nsfs rw,seclabel 0 0 ...
What Is /etc/fstab File? /etc/fstab is a system file that contains a list of definitions of file systems to be mounted automatically at boot time.
For example, here is what I have in /etc/fstab on my Ubuntu computer.
herong$ head /etc/fstab UUID=bfb24f1-... /boot ext4 defaults 1 2 /dev/mapper/cl-root / xfs defaults 0 0 /dev/mapper/cl-home /home xfs defaults 0 0 /dev/mapper/cl-swap swap swap defaults 0 0 UUID=04904a81-... /mnt/data ext4 rw,seclabel 0 0 file-server:/export /mnt/file nfs defaults 0 0 tmpfs /var/tmp tmpfs gid=nobody,.. 1 0
Table of Contents
Cockpit - Web Portal for Administrator
"df" - Display Free Space of File System
Mount USB Drive as File System
"dd" - Copy Data from/to Storage Devices
Use "dd" Command to Test I/O Speed
"du" - Display Disk Usage of Directories
Mount Windows NTFS File System
Access Persmissions on "ntfs-3g" File System
Reformat NTFS Partition into EXT4 Partition
Mount NFS (Network File System) on macOS
►/etc/mtab and /etc/fstab Files
Unreachable Remote File Systems
SELinux - Security-Enhanced Linux
SSH Protocol and ssh/scp Commands
Software Package Manager on CentOS - DNF and YUM
vsftpd - Very Secure FTP Daemon