当前位置:网站首页>Shell basic concepts

Shell basic concepts

2022-06-10 22:30:00 Wind and smoke fatigue

shell What is it?

When we talk about the command line , We actually mean shell. shell It's an application , It reads commands from the keyboard and sends them to the operating system for execution , To access or implement the management of the operating system . all Linux All distributions have default shell, It's usually bash shell, Derived from GNU Project .“bash” yes “Bourne Again Shell” Acronyms ,bash yes sh Enhanced version of .

terminal

Under the graphical interface operating system , We need an extra program to work with shell Interaction , This program is the terminal simulator , stay Ubuntu The terminal under the system is called gnome-terminal.kde The desktop environment comes with konsole, Such as redhat6, Contemplation 80 Terminals of other systems .

Different shell

sh

sh The full name is Bourne shell, from AT&T The company's Steve Bourne Development , In his honor , Just named after him .

sh yes UNIX The standard on shell, quite a lot UNIX All versions are equipped with sh.sh Is the first popular Shell.

bash

bash shell It's most Linux Default shell.

bash from GNU Organizational development , To keep the sh shell The compatibility of , It's all kinds of Linux The default configuration of the distribution shell.

For all that ,bash and sh There are still some differences :

  • One side ,bash Extended some commands and parameters ;
  • On the other hand ,bash Not exactly with sh;
  • compatible , Some of their behaviors are inconsistent , But in the case of operation and maintenance of most enterprises, the difference is not big , Special scenes can use bash Instead of sh.

csh

sh Then another popular shell It's from Berkeley University Bill Joy The design of the , This shell The grammar of is a little similar to C Language , That's why it's called C shell , Referred to as csh.

tcsh

tcsh yes csh Enhanced Edition , Added command completion function , Provides more powerful syntax support .

ash

A simple lightweight Shell, Less occupied resources , Suitable for running in low memory environment , But with the following bash shell Fully compatible with .

Other

View what the current terminal uses shell?

echo $SHELL

Switch to other shell, Such as bash shell

exec bash

原网站

版权声明
本文为[Wind and smoke fatigue]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/161/202206102119554746.html