0
Thanks

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)

Issue


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

Solution


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.


0
Thanks

A few words of thanks would be greatly appreciated.

Ask a question
Jean-François Pillou

CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jeff Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.

Learn more about the CCM team

Related

Original article published by . Translated by jak58. Latest update on by jak58.

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 (https://ccm.net/).

0 Comments