58

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?

1
  • 4
    If the partition is mounted, you can rename it just like any other file or folder by highlighting and pressing enter
    – Alexander
    Dec 15, 2013 at 17:04

3 Answers 3

93

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.

5
  • 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. Dec 13, 2012 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, 2013 at 8:35
  • 3
    It worked for me by specifying the path to the mounted volume: diskutil rename /Volumes/UNTITLED\ 1/ newname
    – ipopa
    Jan 18, 2014 at 23:54
  • 2
    I'm on 10.9.5 and I get the error Failed to rename volume: Invalid request (-69886) Apr 18, 2015 at 1:14
  • 10.11.x - this worked for me. Thanks +1
    – ICL1901
    Nov 11, 2015 at 15:21
19

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

1
  • Too simple. ;) You get my vote.
    – Wildcard
    Sep 25, 2016 at 8:06
0

I had an issue where finder was repeatedly restarting which made the mac unusable. Went into single-user mode and spotted that the volume had a lengthy name of strange characters. Could not rename it - since GUI was unavailable and the rename command in single-user needs you to type the name (without being able to cut/paste). This in in High Sierra on a 2015 mac mini. Turns out if you boot into recovery mode with CMD-R, go into disk utility, highlight the disk with the bad volume name then click the name beside the picture of the disk (or do File Rename) it lets you change it. This fixed all my problems and the machine seems fine now.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .