如何查看Linux提供的Shell解析器
更新時間:2023年06月28日 11:05:52 作者:stormkai
這篇文章主要介紹了查看Linux提供的Shell解析器的相關知識,本文通過實例代碼給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友可以參考下
查看Linux提供的Shell解析器
Shell是一個命令行解釋器,它接收應用程序/用戶命令,然后調用操作系統(tǒng)內核。
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來執(zhí)行。
[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解析器內容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!
相關文章
shell腳本實現(xiàn)的網站日志分析統(tǒng)計(可以統(tǒng)計9種數(shù)據)
這篇文章主要介紹了shell腳本實現(xiàn)的網站日志分析統(tǒng)計,可以統(tǒng)計9種數(shù)據,如訪問量、帶寬、訪客量、IP統(tǒng)計、搜索引擎等,需要的朋友可以參考下2014-05-05linux shell之pushd、popd和dirs的使用講解
今天小編就為大家分享一篇關于linux shell之pushd、popd和dirs的使用講解,小編覺得內容挺不錯的,現(xiàn)在分享給大家,具有很好的參考價值,需要的朋友一起跟隨小編來看看吧2019-04-04Ubuntu服務器配置apache2.4的限速功能shell腳本分享
這篇文章主要介紹了Ubuntu服務器配置apache2.4的限速功能shell腳本分享,本文直接給出腳本實現(xiàn)代碼,代碼相關原理都寫在了注釋里,需要的朋友可以參考下2015-03-03