linux挂载U盘

1.查看系统内磁盘sudo fdisk -l

zh@ubuntu:/mnt/usb$ sudo fdisk -l
Disk /dev/sda: 45 GiB, 48318382080 bytes, 94371840 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xce2db9bb

Device     Boot    Start      End  Sectors  Size Id Type
/dev/sda1  *        2048 92370943 92368896   44G 83 Linux
/dev/sda2       92372990 94369791  1996802  975M  5 Extended
/dev/sda5       92372992 94369791  1996800  975M 82 Linux swap / Solaris


Disk /dev/sdb: 14.5 GiB, 15521808384 bytes, 30316032 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot   Start      End  Sectors  Size Id Type
/dev/sdb1  *    1552384 30316031 28763648 13.7G  7 HPFS/NTFS/exFAT
2.将U盘挂载到/mnt/usb目录下

sudo mount /dev/sdb1 /mnt/usb

如果/mnt/usb目录不存在自行创建

3.卸载U盘

sudo umount /mnt/usb

 

你可能感兴趣的:(linux挂载U盘)