Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

I know few commands regarding Mac OS X's Terminal like ls, cd, mkdir etc.

What I want to do is switch over a network computer - how ?

What I tried is as follows -

  • cd /
  • ls
  • cd Network
  • ls ( here I found no computers )

What exactly I am missing ?

Thanks in advance for sharing your knowledge.


share|improve this question
What do you want to accomplish? “Jump”ing on a computer is a bit non-specific. Do you want to access another computer’s shared files? Do you want to run commands on another computer? Something else? – Chris Johnsen Jul 2 '10 at 11:30
Yep ! Same - @Chris - I want to jump to specific / another computer's shared files. As we can explore them using through finder - I want to do the same with terminal. – Sagar R. Kothari Jul 2 '10 at 11:36
up vote 5 down vote accepted

You can use smbtree to list all shares. You can then use mount to mount the share and cd to navigate into it. Note that you need to create the folder you want to mount the share onto. (Alternatively you can mount the share using finder and just navigate to it via cd. They are mounted in /Volumes).

Here's an example of mounting a share, listing its contents and unmounting it again.

cd /Volumes
mkdir myshare
mount -t smbfs //guest@myhost/myshare myshare
ls myshare
umount myshare
rm -r myshare
share|improve this answer

I would use SSH to log into the remote computer, then if you want to transfer any files use scp (SSH copy). A quick search on "SSH on OSX" should get you what you want, in general here are the steps:

1. open terminal on OSX
2. type "ssh [username]@[ip address of remote computer]"

now it's as if you opened terminal on that computer.

You will need to enable SSH in the remote computer's system preferences.

Here's one tutorial (there are many others):

share|improve this answer
You can also use Terminal's Shell > New Remote Connection to browse network computers and create an ssh session. – Chris Page Aug 21 '11 at 10:48
I got the error "ssh: connect to host port 22: Connection refused" – ALX Apr 21 at 23:55

You can always use drag'n'drop: open terminal window, type cd (note space at end) connect to network share and drag it to terminal window, press enter…

Also, if you have bash 4.x, you can add shopt -s autocd to your ~/.bash_login or ~/.profile to skip typing cd part, just directory name.

share|improve this answer
As of Mac OS X Lion 10.7, if you drag a directory (a folder or a server) onto a terminal tab in the tab bar, Terminal will automatically issue a cd command. Also, if you drag onto the tab bar, it will create a new tab at that directory. Dragging onto the Terminal application icon will create a new terminal window at that location. – Chris Page Aug 21 '11 at 10:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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