I have partitions that I would like to rename. What are the terminal commands to do this?
Asked
Active
Viewed 3,219 times
1
-
yes i named that windows in chinese but now i want to rename it normal C D E – Sam Arora Feb 12 '16 at 14:59
-
@Takkat: Dang. I should have searched more thoroughly. That could have saved me a bunch of work. – David Foerster Feb 12 '16 at 20:22
2 Answers
3
You can re-label file systems with Gnome Disks:
If you really want to use the command line, the command depends on the affected file system type. For ext2/3/4 it's
sudo e2label <DEVICE> <NEW_LABEL>
In a similar fashion there are fatlabel, exfatlabel, ntfslabel, btrfs filesystem label, swaplabel for other file system types with the same command syntax.
David Foerster
- 35,754
- 55
- 92
- 145
0
From the command line :
Install the Labeling Program
Based on the package names listed above for each filesystem type, install the correct package for your partition:
sudo apt-get install <package>
Here are all the different ones:
sudo apt-get install mtools
sudo apt-get install ntfsprogs
sudo apt-get install e2fsprogs
sudo apt-get install jfsutils
sudo apt-get install reiserfsprogs
sudo apt-get install xfsprogs
Iidentify your partition
sudo fdisk -l
Example: partition sdX
for FAT32:
sudo mlabel -i /dev/sdX ::"new_label"
for NTFS:
sudo ntfslabel /dev/sdX new_label
for exFAT:
sudo exfatlabel /dev/sdX new_label
for ext2/3/4:
sudo e2label /dev/sdX new_label
GAD3R
- 2,821
- 1
- 18
- 30

