46

I'm trying to access a shared network server via terminal on the Mac.

I can obviously access directories on the same system using just the command cd (e.g. cd /Applications) but our shared network I just can't work out how to get to?

I'm starting to wonder if it's a security issue that would prevent a user from seeing/accessing it.

2

5 Answers 5

52

I suspect the volume has to be mounted first before you'll be able to acces it.

% cd /Volumes/[you server/volume name here]/Users/Shared/

Or you should use ssh.

3
  • How do you mount it though? It's open in Finder, but how to I refer to that shared volume at the command line? My /Volumes only contains a single entry for my SSD -> / Jun 18, 2012 at 13:00
  • 1
    You could try ls -l /Volumes, normally you would see all mounted volumes listed. If it is not in the list I guess it is not mounted properly (unmount and try again?) or you may not access it. Oct 9, 2012 at 11:35
  • I've seen a case where a shared folder from a windows machine went straight into /Volumes. I saw it in finder and dragged it onto the terminal. eg /Volumes/blahfolder no /Volumes/compblah/blahfolder
    – barlop
    May 2, 2020 at 17:46
28
cd /Volumes

there you will find all mounted volumes. There will also be the network-volumes.

2
  • Thanks very much! that did exactly the trick. Are there any good reference I could use in future?
    – Mark McDonnell
    Jul 15, 2010 at 16:03
  • I'm sorry - I do not know any websites about questions like this one
    – Erik
    Jul 16, 2010 at 21:03
7

Use command df to show all mounted volume.

1

Have a look in your root directory under Volumes.

0

In your server ( or where the shared directory is ), add a Samba user and set a password for it:

sudo smbpasswd -a [SharedVolumeName]

Then you can use that user ( SharedVolumeName ) and the password you entered to authenticate and access the shared drive.

You must log in to answer this question.