Drive letters in Mac OS X

Software

While sitting at the Boatdeck Cafe in Mawson Lakes, I was approached by a bloke who said he had just switched his Windows laptop for a MacBook, and he had a question about drive letters in Mac OS X. I've been asked this question many, many times before so I figure many switchers must be having this problem, so I'm posting about the issue here.

ASIDE: Isn’t it funny how Mac people are generally more willing to talk to other Mac people in cafes and whatnot compared to Windows users? I can’t imagine many Windows users saying "I noticed you’re using a Dell, could I ask you some quesions about how to use the taskbar?"

The other funny thing is, I don’t know why this is! Is it just because Macs are less common, or that if you see a Mac user you can be fairly confident they’re running the same software as you? Or is it some psychological Steve Jobs thing?

Mac OS X is the default operating system shipped with new Macs, and it has it’s heritage in Unix. Like other Unix-like OSs such as Linux, Mac OS X does not use drive letters to reference mounted drives: instead it uses essentially virtual directories for each drive located on the primary "root" directory. This would be equivalent to drive c: in DOS.

Windows 2000 Explorer showing drives, for comparison
Windows 2000 Explorer showing drives, for comparison

For example, on Windows if you wanted to reference the notepad.exe in the Windows folder on your primary hard disk, and another file on your optical drive, the addresses would typically look something like this:

C:Windowssystem32notepad.exeD:FolderAnotherchuckpeddle.txt

On a modern Mac, your primary hard drive is typically the one where you have Mac OS X installed. Therefore, all drives you have mounted on your Mac will not only appear on your Desktop, but will be found within their own virtual folders in the hidden Volumes directory on the primary hard disk, which is ALWAYS referenced with a single forward-slash /.

Leopard Finder showing the hidden /Volumes directory
Leopard Finder showing the hidden /Volumes directory

Here are some examples. The first is the address of a file in our Applications folder on our primary hard drive, the second is a CD-ROM we’ve inserted, and the third is a USB key:

/Applications/TextEdit.app/Volumes/Microsoft Office 2008/Installer.app/Volumes/Ruben Memory Key/homework.txt

Notice how the virtual directories which are named after the volume essentially replace the drive letter used on Windows, DOS, CP/M etc. In the first example we didn't need to reference the Volumes folder because it's on our primary hard disk. Mac OS X also uses forward-slashes instead of back-slashes (just like a URL) just like other Unix-like systems.

The only caveat to this system is that Apple intentionally hides the /Volumes folder by default. To view it in the Finder, navigate to the Go menu and enter /Volumes.

Of course you can also fire up your /Applications/Utilities/Terminal.app and enter cd /Volumes, then ls to list the contents.

Author bio and support

Me!

Ruben Schade is a technical writer and infrastructure architect in Sydney, Australia who refers to himself in the third person in bios. Hi!

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite bespoke cloud infrastructure provider.

If you found this post helpful or entertaining, you can shout me a coffee or send a comment. Thanks ☺️.