Using Mount Command With Mac OS

From Littledamien Wiki
Revision as of 08:58, 12 April 2018 by Video8 (talk | contribs)
Jump to navigation Jump to search

Applications

This is a more convenient and reliable way to access shared drives with Git.

Commands

Mount a remote share

For a Windows share, use the -t smbfs option.

$ mount -t smbfs //user:password@server/share_name path/to/mount

Note that a share cannot be mounted twice. If it's already mounted somewhere the mount command will result in an error to the effect of mount error: path/to/mount: File exists See the df command below to troubleshoot these situations.

Unmount

$ umount path/to/mount

View all the current mounts

$ df

Force a refresh of network shares in the Finder

Use case

Disconnect from a remote share, then attempt to reconnect. Clicking the "Connect" button under the remote host in the Finder window has no effect.

Work around

From a Finder window Go > Connect to Server... ( ⌘+K ), enter smb://HostName (or use the IP address in place of the host name).


Notes

External links