码迷,mamicode.com
首页 > 系统相关 > 详细

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

时间:2020-02-04 22:08:55      阅读:98      评论:0      收藏:0      [点我收藏+]

标签:log   默认   问题   detail   直接   use   cat   htm   port   

继续我们的更换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\n" "$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/

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

标签:log   默认   问题   detail   直接   use   cat   htm   port   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!