3.1 KiB
Executable File
3.1 KiB
Executable File
There are several ways to mount a Samba (SMB) share on macOS, ranging from a quick one-time connection to setting it up to reconnect automatically.
Here are the three most common methods:
Method 1: Using Finder (The Easiest Way)
This is best for most users who need to access a share manually.
- Open Finder.
- In the top menu bar, click Go > Connect to Server... (or press
Command + Kon your keyboard). - In the "Server Address" field, type the address of the share using the
smb://prefix:- Example by IP:
smb://192.168.1.50 - Example by Name:
smb://nas-server.local - Example to a specific folder:
smb://192.168.1.50/WorkSpace
- Example by IP:
- Click Connect.
- If prompted, enter your Username and Password.
- Tip: Check "Remember this password in my keychain" so you don’t have to type it every time.
- Select the specific volume/folder you want to mount and click OK.
The share will now appear on your Desktop (if enabled) and in the Finder sidebar under "Locations."
Method 2: Auto-Mounting (Reconnect on Login)
To ensure the share reconnects every time you restart your Mac:
- Follow the steps in Method 1 above to mount the drive.
- Go to the Apple Menu () > System Settings (or System Preferences).
- Go to General > Login Items.
- Under the "Open at Login" list, click the plus (+) icon.
- In the Finder window that pops up, find your mounted Network Share and click Add.
Note: The share will now attempt to mount whenever you log in. If you are not on the same network (e.g., away from the office), you will get an error message.
Method 3: Using the Terminal (For Power Users/Scripts)
If you want to mount a share via the command line or a script:
- Create a folder where the share will be "mounted" (usually in your
/Volumesfolder):mkdir ~/Desktop/MYSAMBA - Use the
mount_smbfscommand:If your password has special characters, you will need to "URL encode" them (e.g.,mount_smbfs //username:password@servername/sharename ~/Desktop/MYSAMBA@becomes%40).
Method 4: Use an Alias (The "Quick Launch" method)
Once you have mounted a share using Method 1:
- Right-click on the mounted drive icon on your desktop or in Finder.
- Select Make Alias.
- Drag that Alias to your desktop or your Dock.
- In the future, simply double-clicking that alias will automatically trigger macOS to mount the network drive.
Troubleshooting Tips
- Windows Domain: If you are connecting to a corporate Windows share, include the domain in the username:
DOMAIN\usernameor use the formatsmb://DOMAIN;username@server/share. - Speed issues: If the share is slow to load folders, you can prevent macOS from writing
.DS_Storefiles to network shares. Open Terminal and type:defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUEThen restart your Mac. - Connection Failed: Ensure that your Mac and the Samba server are on the same local network or that you are connected via VPN.