Skip to content

Shell 概述

Linux 提供的 Shell 解析器有

shell
[root@centos7 ~]# cat /etc/shells
/bin/sh
/bin/bash
/sbin/nologin
/usr/bin/sh
/usr/bin/bash
/usr/sbin/nologin
/bin/tcsh
/bin/csh

bash 和 sh 的关系

shell
[root@centos7 ~]$ ll | grep bash
-rw[atguigu@hadoop101 bin]$ ll | grep bash
-rwxr-xr-x. 1 root root 941880 5 11 2016 bash
lrwxrwxrwx. 1 root root 4 5 27 2017 sh -> bashr-x. 1 root root 941880 5 11 2016 bash
lrwxrwxrwx. 1 root root 4 5 27 2017

Centos 默认的解析器是 bash

shell
[root@centos7 ~]$ echo $SHELL
/bin/bash