
在我的ubuntu系統中,我想查看我的系統磁碟資訊。當我使用fdisk -l
without時sudo
,我什麼也得不到。但是使用 時sudo fdisk -l
,我只得到一個設備 /dev/sda1,但是當我使用 時df -h
,我得到了很多設備,例如/dev/sda2
,/dev/sda4
等等。這樣的磁碟操作有什麼差別呢?
# fdisk -l
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use
Disk /dev/sda: 6000.1 GB, 60000069312512 bytes
255 heads, 63 sectors/track, 729466 cylinders, tatal 11718885376 sectars
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 identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sda1 1 4294967295 2147483647+ ee GPT
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 457G 2.0G 432G 1% /
udev 16G 4.0K 16G 1% /dev
tmpfs 6.3G 236K 6.3G 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 16G 0 16G 0% /run/shm
/dev/sda4 5.0T 604G 4.2T 13% /var
答案1
答案2
答案3
fdisk
檢查磁碟設備上的 MBR。df
列出作業系統中存在的檔案系統。