How to automatically mount network shares on macOS


In this video, we’ll show you how to automatically mount network shares on macOS. This is a game-changer for anyone who’s used a Windows computers. Say goodbye to manual mounting and hello to seamless access to your network shares!

Note: Just a heads up, if you set up automatic network share mounting, it might take a bit longer to sign in. And if you’re a laptop user, even when your computer’s not connected to the network, it’ll still try to mount those shares. That’s why we’ve got a special script for laptops.

  • First mount the network share you wish to automatically open at login. 
  • Now to have the mounted network share appear on the desktop, select Finder – Settings and tick the option Connected server.
  • Next open System Settings and from the sidebar choose General.
  • In the main panel of General locate and select Login Items.
  • Drag and drop your network shares icon into Open at Login.
  • Close System Settings.
  • Now when you log in your computer will automatically mount your network share.

While it is relatively easy to automatically mount network shares in macOS. As Finder will by default open a Finder window, for each network share that is opened. When you sign into your computer, its desktop can appear cluttered. So we prefer to use a Apple Script that will auto mount network shares, but not automatically open Finder windows.

  • Open LaunchpadOtherScript Editor.
  • Now copy the following script.
try
	
	

-- (1) Check that server volumes will appear on desktop when mounted
	
	

tell application "Finder"

activate

set desktop shows connected servers of Finder preferences to true

-- (2) mount server volumes

try
mount volume "smb://ip-address/share-name"
			
			

display notification "The network shares you requested are now available." with title "network-name network shares"
			
		

end try

end tell


end try
  • Drag and drop your application into Login Items.
  • Past the script into Script Editor.
  • Substitute the parts that are in bold for the address of your file server or NAS and the name of your network.
  • Save your script [ FileSave].
  • Test that the script works by running your script.
  • Turn your script into an application by choosing FileExport.
  • In File Format select Application from the drop down menu.
  • Save your application.

Add comment

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

Our site members

Support This Site

If you enjoy our content but don't want to be a site member. Please consider supporting us on Ko-fi to keep us ads free. Thanks for all your support