Blog → Post


(TIP) Labeling a NTFS External Drive
The ntfslabel command.
by @admin, september 27, 2020, 05:15pm utc

This is just a quick addition to our sharing external drives with Windows machines post.

To change the label of the drive that is shown in places like df and in the file manger, you would use ntfslabel.

Steps:

1. Using the df command, get the exact location of the partion that you want to relabel.

In our case, we are after the "Seagate Backup Plus Drive" partion; which is /dev/sdc2 (NOT /dev/sdc ... but /dev/sdc2).

:~# df -h /dev/sdb2 4.6T 4.4T 162G 97% /media/fred/5TB-Red.Master /dev/sdc2 4.6T 4.5T 58G 99% /media/fred/Seagate Backup Plus Drive 

2. Unmount the drive.

Click on the red triangle next to the name in file manager or # umount /dev/sdc

ntfslabel only works if the drive is unmounted. If you Do try and run ntfslabel on a mounted drive, ntfslabel will exit telling you to unmount it.

~# umount /dev/sdc

3. Then ntfslabel the drive and remount it. We will label the drive as "5TB-Red.Copy".

~# sudo ntfslabel /dev/sdc2 5TB-Red.Copy ~# sudo mkdir /media/fred/5TB-Red.Copy ~# sudo mount /dev/sdc2 /media/fred/5TB-Red.Copy (mounting from the file manager handles the mkdir automatically.

And now a df -h returns:

~# df -h /dev/sdb2 4.6T 4.4T 162G 97% /media/fred/5TB-Red.Master /dev/sdc2 4.6T 4.5T 58G 99% /media/fred/5TB-Red.Copy
tags: Advanced users, Tips
Footer done in Inkscape