/Etc/fstab

Source: Internet
Author: User
In linux, the data items of/etc/fstab are as follows: Device name Mount point partition type mount option dump option fsck option LABEL/ext3defaults11tmpfs/dev/shmtmpfsdefaults00devpts/dev/ptsdevptsg...

 

In linux, the data items of/etc/fstab are as follows:

Device Name Mount point partition type mount option dump option fsck option

LABEL = // ext3 defaults 1 1

Tmpfs/dev/shm tmpfs defaults 0 0

Devpts/dev/pts devpts gid = 5, mode = 620 0 0

Sysfs/sys sysfs defaults 0 0

Proc/proc defaults 0 0

1. device name, which can be either the actual device name/dev/sda1 or the actual device tag, such as LABLE = /, we can know that LABEL =/1 is the/dev/sda1 LABEL. what command should we use to set the LABEL for the actual device? for ext3 and ext2 file systems, we can use e2label to set e2label device [newlabel]. for example, if we want to set the/dev/hda1 tag device with the file system as ext3, we should execute the following command: [root @ localhost beinan] # e2label/dev/hda1/1

2. Mount point. there is nothing to say. //,/usr, and swap are the default mount points in the system installation time zone. The method is as follows:

Root @ localhost beinan] # mkdir/mnt/hda1 note: create a directory for mounting/dev/hda1 partitions;

[Root @ localhost beinan] # chmod 777/mnt/hda1 note: Open the permission and all users can read, write, and execute, after completing the preceding two steps, you can use the mount point in/etc/fstab.

3. File System category:

Linux file systems: ext2, ext3, jfs, reiserfs, reiser4, xfs, swap.

Windows:

Vfat = FAT 32, FAT 16

Ntfs = NTFS

Note: For NTFS rw NTFS-3G

CD/DVD/iso: iso9660

Network file systems:

Nfs: server:/shared_directory/mnt/nfs 0 0

Smb: // win_box/shared_folder/mnt/samba smbfs rw, credentials =/home/user_name/winbox-credentials.txt 0 0

Auto: The file system type (ext3, iso9660, etc) it detected automatically. Usually works. Used for removable devices

(CD/DVD, Floppy drives, or USB/Flash drives) as the file system may vary on thesedevices.

4. mount options:

Auto: Automatic mounting. fstab is the default option.

ULTS: rw, suid, dev, exec, auto, nouser, and async.

Noauto is not automatically mounted upon startup

Nouser can be mounted only by super users.

Ro mounting by Read-only permission

Rw mount by read/write permission

User any user can mount

Note that the optical drive and soft drive can be mounted only when the media is installed, so it is noauto

5. dump option: whether to allow the backup program to dump the backup file system. 0 indicates ignore, and 1 indicates Backup. if the last dump backup is used, the number of days since the backup is displayed.

6. the fsck option indicates the sequence in which the fsck program checks the file system. if the value is 0, no check is performed. (/) partitions are always 1. other partitions can only start from 2, if the numbers are the same

Check at the same time (but there cannot be two ones ),

Note: After you modify/etc/fstab, you must reboot the system to make it effective.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.