mac将远程linux服务器目录挂载(mount)到本地

mac通过使用sshfs,可以将远程linux服务器的目录挂载(mount)到本地,就像访问本地目录一样操作远程目录,非常方便;

mac brew安装sshfs

# 安装软件包
brew install sshfs

挂载远程服务器目录到本地

# 创建本地目录,用于挂载
mkdir -p xxxx/mount_remote

# 挂在远程目录到本地,输入密码即可,若要免密,创建sshkey即可
sshfs -C -o reconnect [email protected]:/home/xq.he /xxxx/mount_remote

# 取消挂载
umount /xxxx/mount_remote

brew的安装方式见mac安装homebrew软件包管理工具,并配置国内镜像源

猜你喜欢

转载自blog.csdn.net/myhes/article/details/106712863
今日推荐