如何获得默认shell [英] How to get default shell
本文介绍了如何获得默认shell的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们可以运行类似chsh -s /usr/local/bin/zsh
的方法来设置新的默认Shell.是否有一个命令,我们可以运行要知道,外壳是什么?
We can run something like chsh -s /usr/local/bin/zsh
to set a new default shell. Is there a command we can run to know what that shell is?
我并不是说要打开终端并运行命令来知道我们在哪个shell中,我的意思是像上面的示例一样,如果我在打开/bin/bash
的终端中,我应该运行什么获取/usr/local/bin/zsh
(如果它是当前的默认shell)?
I don’t mean having a terminal open and running a command to know which shell we’re in, I mean like in the example above, if I’m in a terminal with /bin/bash
open, what should I run to get /usr/local/bin/zsh
if it’s the current default shell?
推荐答案
您可以使用以下命令echo $SHELL
这篇关于如何获得默认shell的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文