Name
mount — stdin stdout - file -- opt --help --version
Synopsis
mount [options
]partition
dir
The mount
command, like
diskutil
, makes a disk partition
available and accessible on the Mac. Unlike diskutil
, however, mount
can work with remote systems such as
Windows share drives or NFS. It has the same functionality as the
Finder’s “Connect to Server...” feature in the Go menu.
Suppose you have a Windows server, myserver
, with a share named Work
, and your login name on that server is
jones
. To mount the share on your
Mac in a directory mydir,
run:
➜mkdir mydir
➜mount -t smbfs //jones@myserver/Work mydir
Password:*******
After you enter jones
’s
password, the Windows share is mounted in mydir, ready for use:
➜ls mydir
file1.txt file2.doc ... ➜emacs mydir/file1.txt
Edit a remote file
To unmount the Windows share, use the umount
command:
➜ umount mydir
If the same filesystem were served by NFS (Network File System) instead of a Windows share, the command would be:
➜ mount -t nfs myserver:/Work mydir
Useful options
| Declare that the
mounted device has a particular filesystem type. Some common
values are ➜
Each suffix after mount_ represents a value of
|
| Mount the filesystem read-only. ... |
Get Macintosh Terminal Pocket Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.