Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm able to erase a partition using the Disk Utility, but I want to change the name without losing data. How is it possible?

share|improve this question
4  
If the partition is mounted, you can rename it just like any other file or folder by highlighting and pressing enter –  XAleXOwnZX Dec 15 '13 at 17:04

3 Answers 3

up vote 55 down vote accepted

To rename the volume, enter the following in Terminal:

/usr/sbin/diskutil rename oldname newname

for example:

/usr/sbin/diskutil rename "Macintosh HD" "Mac Disk"

You can also right-click a partition in Finder (in Computername at the top level of the hierarchy), select Get Info, and enter the new name there.

share|improve this answer
    
If you rename the volume where your home directory is, don't forget to update your home directory path in the System Preferences before rebooting. –  Christian Lescuyer Dec 13 '12 at 10:42
    
@ChristianLescuyer That's only a problem if your home directory isn't on the root volume (i.e. the default), and isn't assigned a static mount point e.g. through /etc/fstab. –  Daniel Beck Feb 9 '13 at 8:35
1  
It worked for me by specifying the path to the mounted volume: diskutil rename /Volumes/UNTITLED\ 1/ newname –  Ionut Popa Jan 18 at 23:54

Or just go to Finder and change the name in the left hand column, just like a file.

share|improve this answer

Thank You! That really saved me!

Problem was: - renamed my hard drive in OS X - couldn't login to my user, after restarting OS X (missing user folder)

(I forgot to change my user folder path...)

Solution: - Reboot with CMD+R - open Terminal - use the commands above, to fix re-rename hard drive

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.