Linux command: Mount Mount with uninstall Umount

Source: Internet
Author: User
Tags uuid

Mount: Associates a new file system to the current root filesystem;

Uninstall: The association between a file system and the current root file system is removed;


Mount/umount Introduction to Commands:

Mount Associates the new file system to the current root file system and directly enters mount to display the currently mounted file system.

Umount the association between a file system and the current root filesystem is removed;

1 . Command format:

Mount: Mount

Format: Mount device mount point Usage:mount/dev/sda5/mnt/test

Equipment:

Device file:/dev/sda5

Volume Label: label= ""

Uuid:uuid= ""

mount point: Directory

Requirements:

1, this directory is not used by other processes;

2, the catalogue must exist beforehand;

3, the original files in the directory will be temporarily hidden;

When the mount is complete, the files on the corresponding file system are accessed by the mount point.

Direct Input mount: Displays the devices and mount points that are currently mounted on the system;

[email protected] test]# mount

/dev/sda2 on/type ext4 (rw)

Proc On/proc type proc (rw)

Sysfs On/sys type SYSFS (rw)

Devpts on/dev/pts type devpts (rw,gid=5,mode=620)

Tmpfs on/dev/shm type Tmpfs (rw,rootcontext= "System_u:object_r:tmpfs_t:s0")

/DEV/SDA1 on/boot type EXT4 (rw)

/dev/sda3 on/home type EXT4 (rw)

/DEV/SDA7 on/tmp type EXT4 (rw)

/dev/sda5 on/usr type EXT4 (rw)

None On/proc/sys/fs/binfmt_misc type Binfmt_misc (rw)

Umount: Uninstalling a file system

Format: Umount device or umount mount point usage:umount/dev/sda5 or Umount/mnt/test

Uninstall considerations:

The mounted device is not being used by the process, otherwise it cannot be uninstalled.


2 . Command function:

Mount associates a new file system mount to the current root file system, or displays a file system that is currently mounted

Umount The association between a file system and the current root filesystem is removed;

3 . Command parameters:

mount [Options] [-o options] device Mount_point

-A: Indicates that all file systems defined in the/etc/fstab file are mounted

-N: By default, the Mount command saves the mounted device information to/etc/mtab for each device mounted

The use of the-N option means that information is not written to the file when the device is mounted;

-T Fstype (file type): Specifies the type of file system that is being mounted on the device; When you do not use this option, mount

Call the Blkid command to obtain the type of the corresponding file system;

-R: Read-only Mount

-W: Read-write mount, if the mounted device does not support write operation, mount directly as read.

-O: Specifies the additional mount option, which specifies the properties that are enabled by the file system.

Remount: Re-mount the current file system

RO: Mount as read-only

RW: Mount for read-write

Nosuid: Disable setting Suid


4 . Command instance:

1, Mount/dev/sda5/mnt/test

2. Mount-o Remount,ro/dev/sda5 re-mount and mount as read-only

This article is from the "Learn Linux history" blog, please be sure to keep this source http://woyaoxuelinux.blog.51cto.com/5663865/1867438

Linux command: Mount Mount with uninstall Umount

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.