查看Linux系统默认Shell的两种方式

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Jerry_1126/article/details/82902944

在常用的操作系统中:

  • Linux下默认的Shell是Bourne Again Shell(bash)
  • Solaris和FreeBSD下默认的是Bourne shell(sh)
  • AIX下默认的是korn Shell(ksh)

可以通过下面两种方式来查看Linux系统默认的Shell

方式一:  通过SHELL变量来查看

[root@localhost ~]# echo $SHELL
/bin/bash

方式二: 通过passwd文件来查看

[root@localhost ~]# cat /etc/passwd | grep root
root:x:0:0:root:/root:/bin/bash

备注: 结尾为/bin/bash的即为用户登录后的Shell解释器.

猜你喜欢

转载自blog.csdn.net/Jerry_1126/article/details/82902944
今日推荐