Linux file system mount

  

Mount operation

After the disk or partition is created, you need to mount it to the system to use it. Windows and Mac systems will automatically mount the file system. Linux needs to be mounted. Manually mount or configure the system for automatic mounting.

MOUNT

Manual Mount:

The command mount can be used to mount the file system: In Linux, we mount the formatted disk or partition with the mount command. Go to a directory. Mount the mount point of the device to be mounted; command "mount /dev/sdb1 /mnt" After mounting, you can directly enter the command mount to view the information. Common parameters: The mount command without parameters will display all mounted file systems - t Specify the type of the file system, such as: -t ext4, -t vfat -o Specify the mount option ro, rw is mounted as read-only or read-write. The default is rw sync. Instead of using the cache, write directly to all operations. Async uses a cache to improve file system read and write efficiency. The default is async noatime. It does not update the time of each file access. atime update file access time remount remount file system. For example: mount -o remount,ro /dev/sdb1 /Mnt/remount and read-only


automount:

The configuration file /etc/fstab is used to define the filesystems that need to be mounted automatically, each in fstab One line represents a mount configuration, super user root configuration: Enter the command: "vi /etc/fstab" Configure fstab, add the following format on the original basis: /de v/sdb1 /mnt ext4 defaults 0 0 (devices to be mounted) (mounting point) (file system) (mounting options) (dump, fsck related options) After the operation, enter the command ":w" save and exit, Enter the command "cat /etc/fstab" again to view the configuration information; then reboot and mount to verify if there are any mounts. Devices to be mounted can also be identified using LABEL, using LABEL=THEANSWER instead of /dev/sdb1.


UNMOUNT

The command umount is used to unmount a mounted filesystem: umount filesystem/mount point umount /dev/sdb1 is equivalent to umount /mnt if present The device is busy error indicates that the file system is being used and cannot be uninstalled. You can use the following command to view the process using the file system: fuser -m /mnt You can also use the command lsof to view the file being used: lsof /mnt The reason is because you are working in the current directory, just retreat to the root directory and then uninstall.

The above is a brief introduction to the Linux file system mount steps, I hope to help friends who are initially exposed to Linux systems.

Source address: http://www.splaybow.com/post/linux-filesystem-mount.html

Copyright © Windows knowledge All Rights Reserved