指定后, .bash_profile 中只有这行:
[ -f $HOME/Applications/zsh/bin/zsh ] && exec $HOME/Applications/zsh/bin/zsh -l
管理员su 我的用户名,正常使用ssh.
但我或者管理员远程ssh 用户名@ip 。。。 都提示:
~/Applications/zsh/bin/zsh: error while loading shared libraries: libncurses.so.6: cannot open shared object file: No such file or directory
Connection to xxxxx closed.
管理员指定我的默认shell为bash后,还是同样的提示
最后把[ -f $HOME/Applications/zsh/bin/zsh ] && exec $HOME/Applications/zsh/bin/zsh -l 这行删掉就可以用bash,但zsh就用不了了
奇怪的是,指定zsh为默认shell是几天前的事,这几天内都在用vscode的remote ssh,有时候重新打开远程文件夹。这样的操作没有真正的重新登陆,所有没有暴露问题?
但好像指定zsh为默认shell后,有重启电脑重新登陆
以下两个方法应该是一样的,但修改后,vscode能ssh,mobaxterm会提示
zsh: error while loading shared libraries: libncurses.so.6: cannot open shared object file: No such file or directory
可能要改其他文件,而非bashrc
一:
![1dc636986b2b6ea33a9618f49c22ea68.png](https://i-blog.csdnimg.cn/blog_migrate/7c8055312827de5d4169f02f51f152e0.png)
二:
因为我们没有Root权限,因此无法将本地安装的Zsh添加到/etc/shells
。 因此也就不能通过chsh
切换到我们本地的Zsh。 所以我们仍然使用 Bash 作为登录 Shell,而在~/.bashrc
中运行我们的Zsh。 在该配置文件尾加入:
exec $HOME/usr/bin/zsh
https://harttle.land/2016/10/25/install-oh-my-zsh-locally.html