I have a shared drive called "music". It shows up in Finder without problems.

How do I access this from the command prompt on a Mac? I can't find it anywhere – is there a way to access it?

  • Where is it physically located? Another partition? Another computer? NAS? Online library? What's the path? – Raystafarian Feb 29 '12 at 13:08

If a network share is already mounted in the Finder, it will be accessible through /Volumes in a shell, e.g. if your share is called "music", you'll find it under:


If you still need to mount it, you can actually mount it wherever you like — ideally not to /Volumes, but for example on your desktop. You can use mount_smbfs to do so. The complete syntax would be like this:

mount_smbfs //[domain;][user[:password]@]server[/share] ~/Desktop/music

In your case, if you have no special login and just guest credentials, maybe the following is enough – when prompted for a password, you can just press Enter and skip it:

mkdir -p ~/Desktop/music
mount_smbfs //host/music ~/Desktop/music

… and voilà:

enter image description here

If you have a user and password, you could use //user@host/music, and then enter the password interactively.

To safely unmount it, just call the following:

umount ~/Desktop/music/
  • When I try this I get: mount_smbfs: server connection failed: Cannot allocate memory – Rooster242 Aug 30 '13 at 3:25

I have to test this on my Mac, but this article explains using the smbclient to execute what you need.

Take a look over here.

In a nutshell:

$ smbclient -U user -I -L //smbshare/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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