查看最后一个有大小14G 的就是U盘
ubuntu@ubuntu:~$ sudo fdisk -l
[sudo] password for ubuntu:Disk /dev/loop0: 86.6 MiB, 90759168 bytes, 177264 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
Disk /dev/loop1: 86.9 MiB, 91099136 bytes, 177928 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
Disk /dev/loop2: 86.9 MiB, 91115520 bytes, 177960 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
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 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: gpt
Disk identifier: C7FB83F8-0545-4540-A46C-9AA0758F346A
Device Start End Sectors Size Type
/dev/sda1 2048 4095 2048 1M BIOS boot
/dev/sda2 4096 976771071 976766976 465.8G Linux filesystem
Disk /dev/sdb: 14.3 GiB, 15376000000 bytes, 30031250 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: 0x0060723f
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 30031249 30029202 14.3G 7 HPFS/NTFS/exFAT
ubuntu@ubuntu:~$ NTFS 格式的
还有一个方式判断:
ls -rtl /dev 看时间判断
crw-rw-rw- 1 root tty 5, 0 Jul 9 13:58 tty
brw-rw---- 1 root disk 8, 0 Jul 10 09:18 sda
brw-rw---- 1 root disk 8, 2 Jul 10 09:18 sda2
brw-rw---- 1 root disk 8, 1 Jul 10 09:18 sda1
drwxrwxrwt 2 root root 40 Jul 13 09:33 shm
drwxr-xr-x 2 root root 80 Jul 13 15:36 bsg
crw-rw---- 1 root disk 21, 1 Jul 13 15:36 sg1
drwxr-xr-x 2 root root 4120 Jul 13 15:36 char
brw-rw---- 1 root disk 8, 16 Jul 13 15:36 sdb
brw-rw---- 1 root disk 8, 17 Jul 13 15:36 sdb1
drwxr-xr-x 7 root root 140 Jul 13 15:36 disk
drwxr-xr-x 2 root root 300 Jul 13 15:36 block
crw-rw-rw- 1 root tty 5, 2 Jul 13 2018 ptmx
指定文件系统类型 NTFS进行挂载:
ubuntu@ubuntu:~$ sudo mount -t ntfs /dev/sdb1 /home/ubuntu/123/
The disk contains an unclean file system (0, 0).
The file system wasn't safely closed on Windows. Fixing.
ubuntu@ubuntu:~$ 提示翻译 :磁盘包含一个不干净的文件系统(0, 0)。文件系统在Windows上没有安全关闭。固定。
是一个U盘启动盘
ubuntu@ubuntu:~/123/主目录$ df -lh
Filesystem Size Used Avail Use% Mounted on
udev 7.8G 0 7.8G 0% /dev
tmpfs 1.6G 2.6M 1.6G 1% /run
/dev/sda2 458G 243G 192G 56% /
tmpfs 7.8G 0 7.8G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
/dev/loop0 87M 87M 0 100% /snap/core/4486
/dev/loop1 87M 87M 0 100% /snap/core/4917
/dev/loop2 87M 87M 0 100% /snap/core/4830
tmpfs 1.6G 0 1.6G 0% /run/user/0
tmpfs 1.6G 0 1.6G 0% /run/user/1000
/dev/sdb1 15G 3.1G 12G 22% /home/ubuntu/123 已挂载
卸载
ubuntu@ubuntu:~/123/主目录$ sudo umount /dev/sdb1
umount: /home/ubuntu/123: target is busy. 不知为何 正忙 因为在挂在目录下卸载所以正忙 尴尬不
ubuntu@ubuntu:~/123/主目录$ sudo umount -l /dev/sdb1 强制卸载
建议 sudo umount /home/ubuntu/123 卸载 万一卸载错了 如何办