Search

Introduction and different fields of Linux fstab configuration file, fstab howto

The Linux /etc/fstab is a configuration file that contains information of all the partitions and storage devices in your computer. The Linux /etc/fstab contains information of where your partitions and storage devices should be mounted and how.

The following contents lists a sample Linux /etc/fstab file

LABEL=/          /                       ext3    defaults        1 1
LABEL=/boot      /boot                   ext3    defaults        1 2
devpts           /dev/pts                devpts  gid=5,mode=620  0 0
tmpfs            /dev/shm                tmpfs   defaults        0 0
proc             /proc                   proc    defaults        0 0
sysfs            /sys                    sysfs   defaults        0 0
LABEL=SWAP-sda3  swap                    swap    defaults        0 0

Additional entries are "devpts", "/proc", "tmpfs", "sysfs"

• The devpts file system provides an interface to pseudo-terminal (pty) devices. It is typically mounted at /dev/pts.

• The /proc filesystem is to provide an easy way to view kernel and information about currently running processes.

• The tmpfs is a temporary file storage facility.

• sysfs is a virtual file system which exports information about devices and drivers from the kernel device model to userspace, and is also used for configuration.

The following table describes the different fields of /etc/fstab file.

 

 

Field Name

 

 

Description

Device

Specifies the device to be mounted. You can specify the device file or Label in this field. If mounted, you can find the related information from /etc/mtab file.

Mount Point

The directory under the root filesystem, where this filesystem will be mounted.

Filesystem Format

Specifies the filesystem type (ext2, ext3, iso9660 etc).

Mount Options

Refer the next link to learn about different Linux mount options

Dump Value

Dump is a backup utility. The possible values can be either 0 or 1. Dump use  this value to decide whether the filesystem should be backed up. If the value is "0", dump will ignore that filesystem.

Filesystem Check Order

"fsck" is a tool to check the file system consistency. This value determines the order that filesystems are checked by "fsck" program during the boot process. If the value is "0", fsck won't check the filesystem.

Related Tutorials
• Linux File System Management Tools - fdisk command
• Linux File System Management Tools - mkfs, mkfs.ext2, mkfs.ext3 commands
• What is file system journaling?
• Linux File System Management Tools - fsck command
• Linux mount and umount commands
• Linux mount options