LoginSignup
109
108

More than 5 years have passed since last update.

MacでターミナルからSambaをマウントする

Last updated at Posted at 2014-06-13

従来はfinderから接続するか、Alfredで徐ろに "smb://192.168.x.x" とか打ち込んで接続していましたが、Lionあたりから "mount_smbfs" なるコマンドが使えるようになっているみたいです。

usage: mount_smbfs [-Nh] [-d mode] [-f mode]
                   //[domain;][user[:password]@]server[/share] path

192.168.10.64 に立ち上がっているSambaの "sites" にユーザー "foo" でアクセスしたければ

$ mount_smbfs //foo@192.168.10.64/sites sites
Password for 192.168.10.64: 

こんな感じにすれば sites ディレクトリにマウントされます。便利。

アンマウントは umount で。

$ umount sites

ちなみにfinderで接続した場合は /Volumes/sites にマウントされます。

2017/3/24 追記 : 現在は非推奨

Sierra においては mount_smbfs は非推奨で、mountコマンドでいけるらしいです。
(コメントの情報参照)

109
108
4

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
109
108