Configuration format of fstab files in Linux

Source: Internet
Author: User
The content of linux/etc/fstab mainly includes six items: for example, the following two lines: LABEL/ext3defaults11/dev/sda2/mnt/D/vfatdefaults00 first column: device Name or device volume name (/dev/sda10 or LABEL/) column 2: Device Mount Directory (for example, the above/or/mnt/D/) column 3: device file system

Linux/etc/fstab contains six items:

For example, the following two rows:
LABEL = // ext3 defaults 1 1
/Dev/sda2/mnt/D/vfat defaults 0 0


Column 1: Device name or device volume name (/dev/sda10 or LABEL = /)
Column 2: Device Mount Directory (for example, the above "/" or "/mnt/D /")
Column 3: device file system (for example, the above "ext3" or "vfat ")
Column 4: mount parameters (see Help man 8 mount)
For a mounted device, such as the/dev/sda2 above, you need to change the Mount parameter. you do not need to detach the device,
You can use the following command (the remount parameter is invalid if no mounted device exists)
# Mount/mnt/D/-o remount, ro (change defaults to ro)
To ensure security, you can specify other mount parameters, such:
Noexec,
Even the mount command cannot be used. in this case, only the system is re-built !)
Nodev (device files cannot be mounted)
Nosuid and nosgid (suid and sgid attributes are not allowed)
Nouser)
Column 5: indicates whether to back up data (0 indicates no backup, 1 indicates backup, and generally the root partition must be backed up)
Column 6: indicates the order of self-check (0 indicates no self-check, 1 or 2 indicates self-check. if the root partition is set to 1, other partitions can only be 2)


My Red Hat Enterprise Linux AS 4/etc/fstab example:
-------------------------- File begin ------------------------------------------------------
# This file is edited by fstab-sync-see 'Man fstab-sync' fordetails
/Dev/hda1/boot ext3 defaults 1 2
/Dev/hda2/data ext3 defaults 1 2
/Dev/hda3/ext3 defaults 1 1
/Dev/hda5/oracle ext3 defaults 1 2
/Dev/hda6/home ext3 defaults 1 2
/Dev/hda7 swap defaults 0 0
None/dev/pts devpts gid = 5, mode = 620 0 0
None/dev/shm tmpfs defaults 0 0
None/proc defaults 0 0
/Dev/hdc/media/cdrom1 auto pamconsole, exec, noauto, managed 0 0
-------------------------- File end -------------------------------------------------------
 

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.