Map a network drive in Mac OSX

There are several places where you need to map a network drive to your computer, for example when you are in a company network and you want to have the shared network drive of your company domain on your computer. The term “mapping” is a technical term for mounting or loading a network drive to a computer.

For this purpose there are more than one way to do it and map the network drive to your Mac OSX and in this article I’m explaining two of those ways which are easier, faster and safer, one from Finder window and the other one from Terminal.

Before I explain these two ways, you are better to know about related network protocols, but in brief, we have two major types:

  • AFP : Servers on your network that use Apple Filing Protocol (AFP) over TCP/IP, including servers with OS X Server installed
  • SMB/CIFS, NFS, FTP, and WebDAV : servers running on OS X Server, UNIX, Linux, and Windows servers

So most of the times, you are good to use the second time since it covers a wide range or servers. In this article I’m going to use SMB.

You can use the terminal part for other linux distributions with a little bit of tweak.


Mapping a network drive through Finder

This is the easiest way and you don’t need to know any command to perform this:

  1. Open Finder
  2. Press and hold command () key and press up arrow key () multiple times until you see your drives and Network iconGo to Network in Finder window
  3. Go to your Networks.
  4. If you see your target server, simply open it (mostly AFPs are listed). If the server that you ar looking for is not there, press command () + K to open the “Connect to server” window.
  5. Type your server or domain name in the Server Address input box as below (remember to replace the “TheDomainName” with your server address):
  6. Press the Connect button from the right bottom of the window.Connect to server window
  7. Optional step: if you wish to save this server so you can easily connect to it later, press the + button in the right side of the Server Address input box to save it in the list.


Mapping a network drive through

This part is compatible with Mac OSX and other Linux distributions with a little bit of tweak. These steps are similar to mounting USB flash memory, but instead of a device, you are

  1. Create a folder to mount your drive into. (it can be anywhere you like, here I chose your user home folder)
    mkdir ~/NetworkMountFolder
  2. mount the drive by the following command (remember to change everything which starts in uppercase to your own server address, user/pass and folder path info)
    mount -t smbfs //Username:Password@MyServer/Public ~/NetworkMountFolder


If you want more info on this function, go to this link.

When you are done with your mapped drive, you may want to unmount it and you can use the following command:

umount ~/NetworkMountFolder

In case you could not figure out how to tweak this for linuxes such as RHEL/CentOS/Fedora, Ubuntu, etc., tell me in the comment so I provide you the code you need (do not post your username and password to me and instead use dummy names).

Leave a Reply

Your email address will not be published. Required fields are marked *

This is new type of CAPTCHA, make the puzzle please !WordPress CAPTCHA