Macos – How to jump on specific computer using terminal on Mac OS X

macmacosnetworkingterminal

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.

Sagar

Best Answer

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
Related Question