如何查看Linux提供的Shell解析器

Olinda ·
更新时间:2024-05-17
· 326 次阅读

目录

查看Linux提供的Shell解析器

1. 查看CentOS默认的解析器

2. Linux提供的解析器

3. bash和sh的关系

查看Linux提供的Shell解析器

Shell是一个命令行解释器,它接收应用程序/用户命令,然后调用操作系统内核。

1. 查看CentOS默认的解析器 [root@localhost home]# echo $SHELL /bin/bash 2. Linux提供的解析器 [root@localhost home]# cat /etc/shells /bin/sh /bin/bash /usr/bin/sh /usr/bin/bash /bin/tcsh /bin/csh 3. bash和sh的关系

根据命令ls -l /bin/ | grep sh查看

sh -> bash 可以知道sh是连接到bash来执行。

[root@localhost home]# ls -l /bin/ | grep sh -rwxr-xr-x. 1 root root 2668 6月 10 2014 amuFormat.sh -rwxr-xr-x. 1 root root 964536 11月 25 2021 bash lrwxrwxrwx. 1 root root 10 5月 25 22:26 bashbug -> bashbug-64 -rwxr-xr-x. 1 root root 6964 11月 25 2021 bashbug-64 -rwxr-xr-x. 1 root root 19792 8月 9 2019 cgsnapshot -rws--x--x. 1 root root 23880 2月 3 2021 chsh -rwxr-xr-x. 1 root root 7565240 11月 17 2020 crash lrwxrwxrwx. 1 root root 4 5月 25 20:47 csh -> tcsh -rwxr-xr-x. 1 root root 11576 8月 2 2017 fipshmac -rwxr-xr-x. 1 root root 15472 11月 19 2020 gdm-screenshot -rwxr-xr-x. 1 root root 4629 4月 1 2020 gettext.sh -rwxr-xr-x. 1 root root 85568 11月 2 2018 gnome-screenshot -rwxr-xr-x. 1 root root 20544 8月 31 2021 gnome-shell -rwxr-xr-x. 1 root root 2157936 8月 31 2021 gnome-shell-extension-prefs -rwxr-xr-x. 1 root root 7331 8月 31 2021 gnome-shell-extension-tool -rwxr-xr-x. 1 root root 11686 8月 31 2021 gnome-shell-perf-tool lrwxrwxrwx. 1 root root 58 5月 25 20:46 gnome-weather -> /usr/share/org.gnome.Weather/org.gnome.Weather.Application -rwxr-xr-x. 1 root root 277 8月 11 2022 gvfs-trash -rwxr-xr-x. 1 root root 7712 10月 1 2020 ksshell -rwxr-xr-x. 1 root root 15864 4月 13 2018 lchsh -rwxr-xr-x. 1 root root 11416 11月 6 2016 ldns-nsec3-hash -rwxr-xr-x. 1 root root 2291 7月 31 2015 lesspipe.sh -rwxr-xr-x. 1 root root 5470 10月 1 2020 lprsetup.sh lrwxrwxrwx. 1 root root 6 5月 25 20:32 mshortname -> mtools lrwxrwxrwx. 1 root root 6 5月 25 20:32 mshowfat -> mtools -rwxr-xr-x. 1 root root 11600 4月 16 2021 nettle-hash -rwxr-xr-x. 1 root root 15352 12月 16 2020 pax11publish -rwxr-xr-x. 1 root root 41872 3月 7 22:54 regshell -rwxr-xr-x. 1 root root 34620 4月 1 2020 rescan-scsi-bus.sh lrwxrwxrwx. 1 root root 18 5月 25 22:28 scsi-rescan -> rescan-scsi-bus.sh lrwxrwxrwx. 1 root root 19 5月 25 22:27 setup-nsssysinit -> setup-nsssysinit.sh -rwxr-xr-x. 1 root root 1539 3月 21 00:12 setup-nsssysinit.sh lrwxrwxrwx. 1 root root 4 5月 25 22:26 sh -> bash -rwxr-xr-x. 1 root root 37448 11月 17 2020 sha1sum -rwxr-xr-x. 1 root root 41608 11月 17 2020 sha224sum -rwxr-xr-x. 1 root root 41608 11月 17 2020 sha256sum -rwxr-xr-x. 1 root root 41624 11月 17 2020 sha384sum -rwxr-xr-x. 1 root root 41624 11月 17 2020 sha512sum -rwxr-xr-x. 1 root root 35928 3月 7 22:54 sharesec -rwxr-xr-x. 1 root root 10371 5月 13 2020 show-changed-rco -rwxr-xr-x. 1 root root 15840 11月 25 2021 showconsolefont -rwxr-xr-x. 1 root root 16572 5月 13 2020 show-installed -rwxr-xr-x. 1 root root 15600 11月 25 2021 showkey -rwxr-xr-x. 1 root root 7248 8月 12 2017 showrgb -rwxr-xr-x. 1 root root 54208 11月 17 2020 shred -rwxr-xr-x. 1 root root 50312 11月 17 2020 shuf lrwxrwxrwx. 1 root root 5 5月 25 22:28 slogin -> ./ssh -rwxr-xr-x. 1 root root 774544 11月 25 2021 ssh -rwxr-xr-x. 1 root root 360936 11月 25 2021 ssh-add ---x--s--x. 1 root nobody 382216 11月 25 2021 ssh-agent -rwxr-xr-x. 1 root root 10469 11月 25 2021 ssh-copy-id -rwxr-xr-x. 1 root root 419208 11月 25 2021 ssh-keygen -rwxr-xr-x. 1 root root 441032 11月 25 2021 ssh-keyscan -rwxr-xr-x. 1 root root 23920 1月 26 00:37 sss_ssh_authorizedkeys -rwxr-xr-x. 1 root root 28016 1月 26 00:37 sss_ssh_knownhostsproxy -rwxr-xr-x. 1 root root 23736 10月 14 2020 stapsh -rwxr-xr-x. 1 root root 546 10月 31 2018 sushi -rwxr-xr-x. 1 root root 404632 11月 17 2020 tcsh -rwxr-xr-x. 1 root root 4165 10月 1 2020 unix-lpr.sh -rwxr-xr-x. 1 root root 15824 2月 3 2021 unshare -rwxr-xr-x. 1 root root 11424 8月 12 2017 xrefresh

根据命令 ls -l /bin/ | grep bash查看

[root@localhost home]# ls -l /bin/ | grep bash -rwxr-xr-x. 1 root root 964536 11月 25 2021 bash lrwxrwxrwx. 1 root root 10 5月 25 22:26 bashbug -> bashbug-64 -rwxr-xr-x. 1 root root 6964 11月 25 2021 bashbug-64 lrwxrwxrwx. 1 root root 4 5月 25 22:26 sh -> bash

到此这篇关于查看Linux提供的Shell解析器的文章就介绍到这了,更多相关Linux Shell解析器内容请搜索软件开发网以前的文章或继续浏览下面的相关文章希望大家以后多多支持软件开发网!



Linux shell

需要 登录 后方可回复, 如果你还没有账号请 注册新账号