macossmb

Connect to SMB Server over command line


What is the equivalent to "Connect To Server" on the mac for the command line?

Connect to Server

I would like to automate the process rather than summon the dialog every time I need to connect to a server.


Solution

  • There are multiple ways to connect to remote server! I am assuming you have server running on Windows. Mac OS X includes the SMB protocol for networking with Windows computers; some Linux and Unix systems can also share files with this protocol as well. You can easily mount a shared SMB volume using the mount command. Follow these steps:

    mkdir /temp
    chmod 777
    mount -t smbfs //username@ip/nameOfSharefolder /temp
    

    After this you can browse to/temp directory and browse.

    You can also use ssh or ftp command to access the remote server but you need to run the ftp server in case of ftp command or remote access must be enabled in case of ssh.