Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the common shell of linux

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces the relevant knowledge of "what are the common shell of linux". The editor shows you the operation process through an actual case, and the operation method is simple, fast and practical. I hope that this article "what are the common shell of linux" can help you solve the problem.

Three kinds of shell:1, bourne shel, referred to as sh, are an exchangeable command interpreter and command programming language; 2. C shell, referred to as csh, using "C-like" syntax, is a C-style shell;3, korn shell, upward compatible with sh, and contains many features of csh.

The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.

What is shell?

As the shell of the operating system, the shell of the Linux system provides users with the interface to use the operating system. It is a command language, a command interpreter and a programming language.

Shell is the interface between the user and the Linux kernel. If you think of the Linux kernel as the center of a sphere, shell is the outer layer around the kernel. When commands are passed from shell or other programs to Linux, the kernel reacts accordingly.

Shell is a command language interpreter, it has its own built-in shell command set, shell can also be called by other applications in the system. The commands entered by the user at the prompt are explained by shell and then passed to the Linux core.

Three kinds of shell commonly used in linux

There are many types of shell in Linux, of which the three most commonly used are bourne shell (sh), c shell (csh), and korn shell (ksh).

1 、 Bourne shell

Bourne shell is an interchangeable command interpreter and command programming language.

Bourne shell is a standard UNIX shell that used to be used as a management system. Most system management command files, such as rc start, stop, and shutdown, are command files for Bourne shell and are often used by system administrators when checked in with root in single-user mode (single user mode). Bourne shell is developed by AT&T and is famous for its simplicity and speed. The default value for Bourne shell prompt symbols is $.

2 、 c shell

C shell is a more suitable variant of Shell than Bourne Shell, using "C-like" syntax. Csh is a kind of shell with C language style, which has 52 internal commands.

C shell was developed by the University of Berkeley (Berkeley) and adds some new features, such as command line history (history), aliases (alias), built-in arithmetic, file name completion (filename completion), and job control (job control). For users who often execute shell in conversation mode, they prefer to use C shell;, but for system managers, they prefer Bourne shell as command file, because Bourne shell command file is simpler and faster than C shell command file. The default value for C shell prompt symbols is%.

3 、 korn shell

Korn shell is a Unix shell. It was written by David Korn of Bell Labs in the early 1980s. It is fully upward compatible with Bourne shell and includes many of the features of C shell, such as command editing required by Bell Labs users.

Korn shell is the superset of Bourne shell, developed by David Korn of AT&T. It adds some features and is more advanced than C shell. Korn shell features editable courses, aliases, functions, regular expression universal characters (regular expression wildcard), built-in arithmetic, work control (job control), co-processing (coprocessing), and special debugging. Bourne shell is almost completely upward compatible-compatible with Korn shell, so programs developed under Bourne shell can still be executed on Korn shell. The default value for Korn shell prompt symbols is also $. The Korn shell used in the Linux system is called pdksh, which refers to Public Domain Korn Shell.

Each of the three shell has its own advantages and disadvantages:

Sh is the shell originally used by Unix and can be used on every Unix. Sh is quite good at shell programming, but not as good as csh and ksh in handling interactions with users.

The default shell for Linux is bourne again shell (bash), which is fully backward compatible with sh. Bash is put in bin/bash, it has many features, it can provide functions such as command completion, command editing and command history table, it also contains many advantages of csh and ksh, has flexible and powerful programming interface, and has a friendly user interface.

Therefore, we should at least know that sh and bash are the default shell on Linux, and bash is an updated version of sh.

This is the end of the content about "what are the common shell of linux". Thank you for your reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report