Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to list the network shared items in the Terminal command line the way Finder sees them in the Mac OS X GUI?

share|improve this question
up vote 7 down vote accepted

In terminal, use ls to get a directory listing.

The mounted volumes are under /Volumes so you want to use

ls /Volumes to see the attached network drives.

EDIT based on OPs comment

ahh, so you want to see a listing of the servers available (or more accurately, the servers which are registered for discovery). I believe the 'Networks' tab reflects Bonjour discovery services.

So, based on this Hint about Bonjour and This StackOverflow Q/A you are probably looking for dns-sd but you would need to identify which services (ssh, afp, lpr etc) you are expecting to find.

try: dns-sd -B _ssh._tcp . or dns-sd -B _afpovertcp._tcp .

Please note, the man page for dns-sd states:

The dns-sd command is primarily intended for interactive use. Because its command-line arguments and output format are subject to change, invoking it from a shell script will generally be fragile.

share|improve this answer
    
How do I see all the (unattached) Network computers like I do when I press apple-shift-k in the Finder? – chuckkahn Jan 10 '12 at 17:55
    
Not all attached network drives are under /Volumes. Using the mount command you can put them other places. – John Henckel Jul 2 '14 at 15:52
    
Sorry for reviving a stale answer, but regarding @JohnHenckel's comment, you can use df -h to list other mounts. – Michael Bailey Aug 12 '15 at 17:57

You must log in to answer this question.

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