Linux File Mount command mount

Source: Internet
Author: User

In Linux system, hard disk, u disk, optical drive and other devices need to be mounted before normal use. Here are some summaries of how mount commands are used.

File Mount command mount
Mount [-T file system type][-l volume label name][-o Special Options] Device file name mount point
Mount to view the devices that are already mounted on the system
Options:
-L Query the system for devices that are already mounted,-l displays the volume label name
-A automatically mounts based on the contents of the/etc/fstab profile
-t specifies file system type mount, can ext3, Ext4, iso9600 and other file system
-L MOUNTS the partition of the specified volume label instead of mounting it by the device file name
-O special option, you need to specify additional parameter options

The partial parameters supported by-O are as follows
Atime/noatime: Update access time/not update access time. When accessing a partition file, whether to update the access time of the file, the default is update.
Async/sync: Asynchronous/Synchronous, default to asynchronous
Auto/noauto: Automatic/Manual, mount-a when the command is executed, automatically according to the contents of/etc/fstab file, the default is automatic
Defaults: Defines the default value, which is equivalent to the seven options of Rw,suid,dev,exec,auto,nouser,async
Exec/noexec: Execute/Not execute, set whether executable files are allowed in the file system, the default is exec allow. So sometimes the file cannot be executed, not the user does not have permissions, but the partition device does not allow executable execution .
Remount: Re-mount the mounted file system, which is typically used to specify special permissions to modify.
Rw/ro: Read/write/read-only, file system mount, whether read and write permissions, the default is RW.
Suid/nosuid: Has/does not have SUID permissions, the device file system has suid and Sgid permissions, the default has.
User/nouser: Allow/Disallow normal user mount, set whether the file system allows ordinary users to mount, default is not allowed, only root can mount the partition
Usrquota: Write on behalf of the file system supports user disk quotas, which are not supported by default.
Grpquota: Write represents the file system support Group disk quota, which is not supported by default.

Usage Example: Mount-o remount,noexec/home
Re-mount the home partition and do not allow executables to be executed under that partition
Note: Do not easily change the default parameter options, if you change the system boot partition to NOEXEC permissions, the system boot may fail because some programs are executed at startup.

Linux File Mount command mount

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.