Under Linux use mount to mount the device to a directory

Direct mount device path directory path under normal circumstances, it. umount the device name, you can uninstall the device
using lsblk -f can see the mounted equipment, as well as the device's file system.


@ PC-tao root: / # lsblk the Boot -f
NAME FStype LABEL UUID MOUNTPOINT
sda
├─sda1
├─sda2 vfat SYSTEM_DRV B467-E8A8
├─sda3
├─sda4 NTFS Windows8_OS 8A461C98461C875B / Media / tao / Windows8_OS
├─sda5 ext4 e297ae56- aac5-f26c1e5cad84-7c17-48ea /
├─sda6 NTFS entertainment 7C387F10387EC8A2 / media / tao / entertainment
├─sda7 ntfs office CC5A23C35A23A8E2 / media / tao / office
├─sda8 ntfs software 4E8CEF168CEEF6FD / media / tao / software
└─sda9 ntfs Lenovo_Recovery CE3C64723C64578B

This is my mobile hard drive, / dev / sdb1 on a partition mounted to / media / tao / Elements directory
sdb
└─sdb1 NTFS Elements 2A629C45629C17A1 / media / tao / Elements


When the mount directory, if the directory has been mounted in the data file, then mount the complete original data after it's gone into this directory will enter my mobile hard disk when the original files after the uninstall has emerged .
When the mount directory must exist, an error does not exist.
Mount / dev / sdb1 / Media / tao / Elements
umount / dev / sdb1


I see before ESP partition / dev / sda2, mounted to the / media / tao / test directory, you can view the contents of his
Mount / dev / sda2 / media / tao / test
umount / dev / sda2


Saved in the file / etc / fstab are automatically mounted directory, if it is not sure the system does not start up, it took me to install linux system partition to the root mount /
├─sda5 ext4 e297ae56-7c17-48ea- aac5-f26c1e5cad84 /

root@tao-PC:/boot# cat /etc/fstab
# /dev/sda5 LABEL=Basic\040data\040partition
UUID=e297ae56-7c17-48ea-aac5-f26c1e5cad84 / ext4 rw,relatime,data=ordered 0 1

/swapfile none swap defaults 0 0

Guess you like

Origin www.linuxidc.com/Linux/2019-10/161159.htm