Linux Shell

Shell

  • Shell 是Linux系统的用户界面,提供了用户与内核进行交互操作的一种接口。它接收用户输入的命令并把它送入内核去执行
  • shell也被称为LINUX的命令解释器(command interpreter)
  • shell是一种高级程序设计语言
    应用程序 - Shell - 系统调用 - 内核 - 硬件

各种Shell

  • sh:Steve Bourne
  • bash:Bourne-Again Shell,GPL,CentOS 和 Ubuntu 默认使用
  • csh:c shell , C 语言风格
  • tcsh
  • ksh :Korn Shell, AIX 默认 shell
  • zsh: MacOS默认shell

主流bash 由Bourne开发的遵循GPL协议的sh的增强版

Linux命令

查看当前使用shell

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

查看系统支持的shell

[root@C8 ~]# cat /etc/shells
/bin/sh
/bin/bash
/usr/bin/sh
/usr/bin/bash

查看系统正在运行的bash

[root@C8 ~]# ps aux | grep bash
root       1726  0.0  0.2  26544  5120 pts/0    Ss+  08:52   0:00 -bash
root       2018  0.0  0.2  26412  5008 pts/1    Ss   10:46   0:00 -bash
root       2150  0.0  0.0  12108   968 pts/1    R+   11:28   0:00 grep --color=auto bash

ps aux 相当于Windows中的任务管理器

* * * 胖并快乐着的死肥宅 * * *
原文地址:https://www.cnblogs.com/bpzblog/p/12609615.html