Article Title: how to mount and detach a mobile hard disk in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Linux is not like Windows. It can be automatically recognized after the new hardware is connected. When the new hardware cannot be automatically identified in Linux, We need to manually identify it. USB mobile storage devices are generally identified as sda1, which can be queried by the fdisk-l command.
Before using a USB flash drive, we need to create a new sub-directory for the external mount point. Generally, the subdirectories of the external mount point are created in/mnt, and we also created there, of course, you can also create a directory in the/directory and set the name by yourself. We will name it usb. The command under the terminal is as follows:
Mkdir/mnt/usb
Then we can connect to my USB flash drive, and then Enter the command at the terminal and press Enter:
Mount/dev/sda1/mnt/usb
In Windows, when the USB flash drive is used up, we need to delete it before removing the USB flash drive. in Linux, we also need to delete the mount point by using the following methods:
Umount/dev/sda1/mnt/usb or umount/dev/sda1
If you do not detach a USB flash drive to umount, data may be lost.