Skip to content

Instantly share code, notes, and snippets.

@nu11secur1ty
Last active April 11, 2016 14:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nu11secur1ty/613050cf834523a34f07b137831b392d to your computer and use it in GitHub Desktop.
Save nu11secur1ty/613050cf834523a34f07b137831b392d to your computer and use it in GitHub Desktop.
fstab file on a typical Linux system.
# device-spec   mount-point     fs-type      options                                          dump pass
LABEL=/         /               ext4         defaults                                            1 1
/dev/sda6       none            swap         defaults                                            0 0
none            /dev/pts        devpts       gid=5,mode=620                                      0 0
none            /proc           proc         defaults                                            0 0
none            /dev/shm        tmpfs        defaults                                            0 0

# Removable media
/dev/cdrom      /mnt/cdrom      udf,iso9660  noauto,owner,ro                                     0 0

# NTFS Windows 7 partition
/dev/sda1       /mnt/Windows    ntfs-3g      quiet,defaults,locale=en_US.utf8,umask=0,noexec     0 0

# Partition shared by Windows and Linux
/dev/sda7       /mnt/shared     vfat         umask=000                                           0 0

# mounting tmpfs
tmpfs           /mnt/tmpfschk   tmpfs        size=100m                                           0 0

# mounting cifs
//pingu/ashare  /store/pingu    cifs         credentials=/root/smbpass.txt                       0 0

# mounting NFS
pingu:/store    /store          nfs          rw                                                  0 0

#The order of the rows (or entries) of the table is not significant; in addition, blank lines and comment lines beginning with a "#" are ignored.

#The space- or tab-separated fields within each row (typically aligned in columns, as above, but this is not a requirement) must appear in a specific order, as follows:

1    device-spec – The device name, label, UUID, or other means of specifying the partition or data source this entry refers to.
2    mount-point – Where the contents of the device may be accessed after mounting; for swap partitions or files, this is set to none.
3    fs-type – The type of file system to be mounted.
4   options – Options describing various other aspects of the file system, such as whether it is automatically mounted at boot, which users may mount or access it, whether it may be written to or only read from, its size, and so forth; the special option defaults refers to a predetermined set of options depending on the file system type.
5   dump – A number indicating whether and how often the file system should be backed up by the dump program; a zero indicates the file system will never be automatically backed up.
6   pass – A number indicating the order in which the fsck program will check the devices for errors at boot time; this is 1 for the root file system and either 2 (meaning check after root) or 0 (do not check) for all other devices.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment