Using Mount Command With Mac OS: Difference between revisions
(Created page with "Category:Mac OS == Applications == This is a more convenient and reliable way to access shared drives with Git. == Co...") |
|||
| (4 intermediate revisions by the same user not shown) | |||
| Line 8: | Line 8: | ||
=== Mount a remote share === | === Mount a remote share === | ||
For a Windows share, use the `-t smbfs` option. | For a Synology or Windows share: | ||
<syntaxhighlight lang="bash"> | |||
$ mount_smbfs //user:password@server/share_name path/to/mount | |||
</syntaxhighlight> | |||
`path/to/mount` must be a directory that already exists on the local file system. | |||
Alternatively, use `mount` with the `-t smbfs` option. | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
| Line 27: | Line 35: | ||
$ df | $ df | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== 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...''' ( <kbd>⌘+K</kbd> ), enter `smb://HostName` (or use the IP address in place of the host name). | |||
== Notes == | |||
=== External links === | |||
* [http://www.markhneedham.com/blog/2011/01/15/mount_smbfs-mount-error-file-exists/ Thoughts on Software Development mount_smbfs: mount error..File exists], Mark Needham, Jan. 2011 | |||
Latest revision as of 09:26, 12 April 2018
Applications[edit]
This is a more convenient and reliable way to access shared drives with Git.
Commands[edit]
[edit]
For a Synology or Windows share:
$ mount_smbfs //user:password@server/share_name path/to/mount
path/to/mount must be a directory that already exists on the local file system.
Alternatively, use mount with 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[edit]
$ umount path/to/mount
View all the current mounts[edit]
$ df
[edit]
Use case[edit]
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[edit]
From a Finder window Go > Connect to Server... ( ⌘+K ), enter smb://HostName (or use the IP address in place of the host name).
Notes[edit]
External links[edit]
- Thoughts on Software Development mount_smbfs: mount error..File exists, Mark Needham, Jan. 2011