A few words of thanks would be greatly appreciated.

Linux - Change the name of partitions

  • This manipulation has been tested under Ubuntu Lucid Lynx (10.04). The tutorial source is for Hardy (8.04). It therefore works with all recent versions of Ubuntu, and perhaps with other distributions.
  • Note that this perfectly work for a partition having the EXT3/4 file format (not NTFS or FATxx).
  • The e2fsprogs package must be installed. (It is by default in Ubuntu Lucid Lynx)


After installing Ubuntu, your disk drives have a funny and long names, which is not practical, especially in a terminal (LS or CD command):


Just change the "Label". This is the name you see for your disc drive on the desktop.
  • Before changing the names, you must know how what partition you will rename: you must list them all . Open a terminal and type:
    • sudo fdisk -l
  • You will then see all the disks with partitions.

Disk/dev/sdb: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors / track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical / physical): 512 bytes/512 bytes
I/O size (minimum / optimal): 512 bytes/512 bytes
Id disc: 0x5c497037

Device Boot Start  End  Blocks     Id   System
/Dev/sdb1    1    7296  58605088 + 83   Linux
  • And if you want to change the name of the partition /dev/sdb1, simply do a:
    • sudo e2label /dev/sdb1 Documents
  • Here, the name given will be "Documents". Of course, you can change it.


A few words of thanks would be greatly appreciated.

Ask a question
CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jean-François Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.
This document, titled « Linux - Change the name of partitions », is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).