1. 程式人生 > >Linux下修改(NTFS)磁碟(卷標)顯示名稱

Linux下修改(NTFS)磁碟(卷標)顯示名稱

我的筆記本裝的雙系統,Windows和Ubuntu,用Ubuntu一段時間了,越來越喜歡Linux,努力學習。。。

Ubuntu下自動載入的的磁碟卷標都是不好辨認長串,不直觀,然後就想修改磁碟顯示的卷標,特意查了下資料,看到了http://wiki.ubuntu.org.cn/%E9%87%8D%E5%91%BD%E5%90%8DUSB%E7%A3%81%E7%9B%98%E6%8C%82%E8%BD%BD%E5%88%86%E5%8C%BA%E5%8D%B7%E6%A0%87

文中說的很詳細,提到了修改命令:

 

編輯ext2/ext3/FAT32/NTFS磁碟分割槽卷標

根據不同的磁碟分割槽型別,分別有3個程式可供選用.

Mtools 適用於 FAT32 格式分割槽.
ntfsprogs 適用於 NTFS 格式分割槽.
e2label適用於 ext2 和 ext3 型格式分割槽.

 

有需要的可以去看看詳細的,比較簡單,我的具體步驟(我的是ntfs分割槽):

1.檢視當前所有分割槽

 

sudo fdisk -l 

顯示結果類似於:

Device Boot Start End Blocks Id System
/dev/sda1 * 63 275659334 137829636 7 HPFS/NTFS/exFAT
Partition 1 does not start on physical sector boundary.
/dev/sda2 275659396 1953523711 838932158 f W95 Ext'd (LBA)
Partition 2 does not start on physical sector boundary.
/dev/sda5 275659398 695116484 209728543+ 7 HPFS/NTFS/exFAT
Partition 5 does not start on physical sector boundary.
/dev/sda6 695116548 1114573634 209728543+ 7 HPFS/NTFS/exFAT
Partition 6 does not start on physical sector boundary.
/dev/sda7 1114573698 1534030784 209728543+ 7 HPFS/NTFS/exFAT
Partition 7 does not start on physical sector boundary.
/dev/sda8 1534030848 1848662464 157315808+ 7 HPFS/NTFS/exFAT
/dev/sda9 1848663216 1852663215 2000000 82 Linux swap / Solaris
/dev/sda10 1852663808 1953523711 50429952 83 Linux

 

2.先解除安裝要修改名稱的分割槽:

sudo umount /dev/sda5

3.修改名稱:

sudo ntfslabel /dev/sda5 music

 

注:ntfslabel會修改名稱後自動重新載入,不用再執行mount命令