編輯ext2/ext3/FAT32/NTFS磁盤分區卷標;根據不同的磁盤分區類型,分別有3個程序可供選用.
Mtools 適用於 FAT32 格式分區.
ntfsprogs 適用於 NTFS 格式分區.
e2label適用於 ext2 和 ext3 型格式分區.
有需要的可以去看看詳細的,比較簡單,我的具體步驟(我的是ntfs分區):
1.查看當前所有分區
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.先卸載要修改名稱的分區:
umount /dev/sda5
3.修改名稱:
ntfslabel /dev/sda5 music
注:ntfslabel會修改名稱后自動重新加載,不用再執行mount命令激活。。。
linux 下修改卷標(磁盤名稱)
如果分區格式為ext2/ext3類型,使用如下命令:
e2label /dev/yourpartition newdiskname
e2label /dev/sda1 sda1