Linux查看U盘路径

fdisk命令查看磁盘情况

输入如下命令:

sudo  fdisk -l

磁盘结果:

[root@localhost OsDeployIso]# sudo  fdisk -l
Disk /dev/sda: 3.7 TiB, 4000225165312 bytes, 7812939776 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 65536 bytes / 65536 bytes
Disklabel type: gpt
Disk identifier: 5DEDCCC4-79FC-45F4-BF78-DA7EC0F7D14C

Device          Start        End    Sectors   Size Type
/dev/sda1        2048  976564223  976562176 465.7G EFI System
/dev/sda2   976564224 1953126399  976562176 465.7G Linux filesystem
/dev/sda3  1953126400 5859416063 3906289664   1.8T Linux LVM

Disk /dev/mapper/cl-root: 465.7 GiB, 500002979840 bytes, 976568320 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 65536 bytes / 65536 bytes


Disk /dev/mapper/cl-swap: 465.7 GiB, 500002979840 bytes, 976568320 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 65536 bytes / 65536 bytes


Disk /dev/mapper/cl-var: 465.7 GiB, 500002979840 bytes, 976568320 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 65536 bytes / 65536 bytes


Disk /dev/mapper/cl-home: 465.7 GiB, 500002979840 bytes, 976568320 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 65536 bytes / 65536 bytes

输入上面命令后,在最下面Device Boot一栏查看自己的U盘所在的分区,一般为sda1,sdb1之类的,如果不能确定哪个是,就输入​​lsblk​​命令,查看没有挂载的并且大小是你u盘大小的就是你的u盘所在的分区。

[root@localhost /]# ​​lsblk

结果内容:

[root@test1 ~]# lsblk -p
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
/dev/sda 8:0 0 40G 0 disk
├─/dev/sda1 8:1 0 300M 0 part /boot
├─/dev/sda2 8:2 0 2G 0 part [SWAP]
└─/dev/sda3 8:3 0 37.7G 0 part /
/dev/sr0 11:0 1 1024M 0 rom

你可能感兴趣的:(Linux,linux,运维,服务器)