Linux Getting Started Basics (v) Linux file system mount management

Source: Internet
Author: User
Tags file system

Mount an operation disk or partition after you create a file system, you need to mount to a directory to be able to use it.

Windows or Mac systems mount automatically, and once the file system is created, it is automatically mounted on the system, which is called C disk, D disk, etc.

Linux requires manual mount operation or configuration system for automatic mount

For example,/dev/sda3 ext4-is mounted under/MNT to use system recommendations to mount to/MNT, but it is actually possible to mount anywhere.

New Mount/dev/sda2 to/mnt in read-only mode

Umount command

Command Umount is used to uninstall the mounted file system, rather with Windows pop-up Umount file System/mount point $ umount/dev/sda2/mnt

The situation may occur/mnt:device is busy. Indicates that the file is in use and cannot be unloaded

You can view the process using the file system with the following command: $ fuser-m/mnt

You can also use the command lsof to view the file that is being used $ lsof/mnt (mount point)

Automatic mount

The profile/etc/fstab is used to customize the file system that needs to be mounted automatically, and each row in the Fstab represents a mount configuration, in the following format:/dev/sda2/mnt/ext4/defaul TS 0 0 Mounting Device mount point file system Mount option dump, fsck related options

Devices that need to be mounted can also be identified using a label, using Label=shuangde instead of/dev/sda2 for example: lable=shuangde/mnt ext4 NOATIME,RW 0 0

The MOUNT-A command mounts the automatic mount options defined in all Fstab

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/

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.