Linux的一个小问题的研究琐事记

继续我们的更换bash为zsh的动手小实验吧。


ssh到我的虚拟机上,想要安装zsh,报错:

User1 is not in the sudoers file.  This incident will be reported.


简单粗暴的解决这个问题:直接用root登录。


检查现在系统上所有的shell:

cat /etc/shells


没有发现zsh,于是安装zsh:

yum install zsh


检查当前所使用的shell:

printf "My current shell - %s " "$SHELL"


替换掉默认的shell:

chsh -s /bin/zsh root


重新使用ssh登录,再检查所使用的shell,发现已经默认使用的就是zsh了。


参考资料

==============

Linux终极shell-Z Shell--用强大的zsh & oh-my-zsh把Bash换掉

https://blog.csdn.net/gatieme/article/details/52741221

How do I find out what shell I am using on Linux/Unix?

https://www.cyberciti.biz/tips/how-do-i-find-out-what-shell-im-using.html

How To Switch From Bash To ZSH On Linux

https://www.addictivetips.com/ubuntu-linux-tips/switch-from-bash-to-zsh-on-linux/

原文地址:https://www.cnblogs.com/awpatp/p/12261545.html