Home >Operation and Maintenance >Linux Operation and Maintenance >Which folder is the USB disk in Linux?
Under Linux, the U disk is under the "/media" or "/mnt" folder; in the Linux system, all devices are files, so our U disk is also a file; the U disk in the Linux system will Being mounted to a mount point, we can access the files and directories in the USB flash drive through the mount point.
#The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.
Which folder is the USB disk in Linux?
In the Linux system, the U disk will be mounted on a mount point (mount point), and the files and directories in the U disk can be accessed through the mount point. Normally, the mount point of the USB flash drive is in the /media or /mnt directory.
Using U disk under Linux system
In Linux system, all devices are files, so our U disk is also a file. The disk device is abstracted into sda files and U disk devices are abstracted into sdb files.
1. View all device files.
In the Linux file system, /dev is stored All device files.
cd /dev #进入dev文件夹 ls #查看所有的文件
The series named sda is a disk device, and the sdb series is a U disk device.
2. External device mount point
In Linux, external devices need to be mounted in the /mnt folder.
cd /mnt #进入/mnt文件夹 ls #列出所有文件, 发现一个也没有 mkdir usb #创建一个名为usb的文件夹, 今后将usb设备挂载在此文件夹上.
3. Use the mount command to mount the device.
First Check the specific name of the U disk device in the /dev folder (starting with sdb, the name of my U disk is sdb4, if there are multiple, please try one by one, mine consists of two (sdb, sdb4)).
sudo mount -t vfat /dev/sdb4 /mnt/usb #将外部名为sdb4的U盘设备挂载到/mnt/usb文件夹上. cd /mnt/usb ls #查看U盘中所有文件
Please unmount the device umount /dev/sdb4 after use.
Related recommendations: "Linux Video Tutorial"
The above is the detailed content of Which folder is the USB disk in Linux?. For more information, please follow other related articles on the PHP Chinese website!