Newbie School: Learn about the mounting Partition Table fstab in Linux

Source: Internet
Author: User
Article Title: New School: Learn how to mount the Partition Table fstab in Linux. Linux is a technology channel of the IT lab in China. Some basic categories include desktop applications, Linux system management, kernel research, embedded systems, and open-source systems. First of all, please refer to the following example. Remember to back up one copy before modification:
 
Sudo cp/etc/fstab. bak
 
#/Dev/sda9
 
UUID = e6496924-053a-498f-a8a1-283e9cefd5c1/ext3 defaults, errors = remount-ro 0 1
 
The first column indicates the name of the disk partition, the second column indicates the mount point, the third column is the file system, the fourth column is the mount option, and the fifth column is the dump option (represented by a number ), column 6 (the following number) indicates the file system check option.
 
Column 1 (red) and column 2 (blue): disk partition and default mount point
 
The partition here is represented by UUID, indicating the partition of the device in the comment of the first line
 
The default mount point, that is, if no other directory is specified during the mounting, the system mounts the device to this directory;
 
The folders of Mount Points in ubuntu are generally placed in the/media Directory;
 
According to the content in fstab, when you enter the command
 
$ Mount/dev/fd0
 
Your soft drive will be mounted to/media/floppy. In fstab, you have told the system where the soft drive should be mounted;
 
Column 3 (green): File System Type
 
The file system refers to the partition type selected during partition formatting. For example, NTFS and FAT partition systems are generally used in Windows, and ext partition systems are generally used in Linux.
 
Auto: if the third column is auto, the file system type is automatically detected;
 
Column 4 (purple): Mount Option
 
Multiple options are separated by commas,
 
Defauts is the default mount option, which is automatically loaded at startup. If this option is noauto, it means to manually mount the device and run the mount command to mount the partition;
 
User and nouser: the user option allows normal users to mount devices, while the nouser option only allows root users to mount devices;
 
Exec and noexec: exec indicates that executable programs in this partition can be run, while noexec indicates that programs in this partition cannot be run.
 
Ro: This partition is mounted in read-only mode. It can be used to install partitions in Windows to avoid misoperation;
 
Rw: mount the system with readable and writable attributes;
 
Sync and async: whether to buffer the write operation of the file, that is, the file is saved to the buffer first, and then written to the disk one by one,
 
For portable disks such as USB flash drives, you should write them to the disk immediately or execute the umount command before unplugging to ensure proper file transmission;
 
Async is a buffer write operation.
 
Defaults: use the default configurations, including rw, suid, dev, exec, auto, nouser, and async;
 
Column 5 and column 6: dump and fsck options
 
Dump is a backup tool. Generally,/partitions are backed up. fsck is a file system scan and check tool. The default value is 1. If it is 2, it indicates other partition systems;
 
For Windows ntfs partition systems, the mount options are somewhat different:
 
#/Dev/sda6
 
UUID = D404C65004C634F0/media/sda6 ntfs defaults, umask = 007, gid = 46 0 1
 
Umask is the permission and gid is the group id.
 
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.