In computer science, a Shell, commonly known as a Shell (to distinguish it from a core), is software that “provides a user interface” (a command parser). It is similar to command.com under DOS and later cmd.exe. It receives user commands and invokes the corresponding application.

Links to courses: Shell programming from beginner to master

The term

It is also a programming language. As a command language, it interactively interprets and executes user input commands or automatically interprets and executes a predefined series of commands. As a programming language, it defines variables and parameters, and provides many control structures, including loops and branches, that are only available in high-level languages.

In sorting algorithms, Shell is the name of hill sort.

Basically, shells fall into two categories:

Graphical User Interface shell (GUI shell)

Such as: Windows Explorer (Microsoft’s Windows operating system) is the most widely used operating system, as well as well-known Linux shells including X Window Manager (BlackBox and FluxBox), And more powerful CDE, GNOME, KDE, XFCE.

2. Command Line Interface shell (CLI shell)

Such as:

Bash/sh/KSH/CSH

(MS-DOS system)

Cmd.exe/Command prompt character (Windows NT)

Windows PowerShell (Windows NT system supporting.NET Framework technology)

In the traditional sense, shell refers to the command line shell. Otherwise, shell refers to the command line shell.

The primary interface between a text operating system and the outside world is called the shell. The shell is the outermost layer of an operating system. The shell manages your interaction with the operating system: waits for your input, interprets it to the operating system, and processes the output of various operating systems.

The shell provides a way for you to communicate with the operating system. This communication can be performed either interactively (typed from the keyboard and immediately responsive) or in shell script(non-interactively). A shell script is a list of shell and operating system commands placed in a file that can be reused. Essentially, a shell script is a simple combination of command-line commands into a single file.

The Shell is basically a command interpreter, similar to Command under DOS. It receives user commands, such as LS, and invokes the appropriate application. The more common shells are the standard Bourne shell (sh) and C shell (CSH).

Interactive and non-interactive shells

Interactive mode is where the shell waits for your input and executes the commands you submit. This mode is called interactive because the shell interacts with the user. This pattern is also familiar to most users: log in, execute some commands, check out. When you check back, the shell terminates.

The shell can also run in another mode: non-interactive mode. In this mode, the shell does not interact with you, but reads commands stored in files and executes them. When it reaches the end of the file, the shell terminates.

The type of the shell

In UNIX, there are:

Bourne shell (including sh, KSH,and bash)

Bourne shell ( sh)

Korn shell ( ksh)

Bourne Again shell ( bash)

POSIX shell ( sh)

C shell (including CSH and TCSH)

C shell ( csh)

TENEX/TOPS C shell ( tcsh)

Bourne Shell

The first significant standard Unix Shell was introduced in V7 Unix(AT&T version 7) in late 1970, and was named after Stephen Bourne, its founding Ministry of Science and Technology infrastructure platform “National Meteorological Network Computing Application Node Construction” (2004DKA50730). Bourne Shell is a switched command interpreter and command programming language. The Bourne shell can run as the Login shell or a subshell of the Login shell. Only the login command can invoke the Bourne shell as a login shell. At this point, the shell first reads the /etc/profile and $HOME/.profile files. The /etc/profile file customizes the environment for all users, and the $HOME/. Profile file customizes the environment for this user. Finally, the shell waits to read your input.

C Shell

Bill Joy developed the C Shell at the University of California, Berkeley, in the early 1980s. It was designed to make it easier for users to use interactive features, and to turn ALGOL style syntax into C style. It added command history, alias, file name replacement, job control, and so on.

Korn Shell

For a long time, there were only two types of shell to choose from: the Bourne shell for programming and the C shell for interaction. To change that, David Korn of AT&T’s Bell LABS developed the Korn Shell. KSH combines all the interactive features of the C shell with the Bourne shell syntax. As a result, Korn Shell is very popular with users. It also added mathematical calculations, coprocess, inline editing, and more. Korn Shell is an interactive command interpreter and command programming language. It complies with POSIX, an international standard for operating systems. POSIX is not an operating system, but a standard aimed at application portability — across multiple platforms at the source level.

Bourne Again Shell (bash)

Bash is part of the GNU Project to replace the Bourne shell. It is used on GNU based systems such as Linux. Most Linux(Red Hat,Slackware,Caldera) have bash as the default shell, and when sh is run, bash is actually called.

POSIX Shell

POSIX shell is a variant of Korn shell. Currently, the largest vendor of POSIX shells is Hewlett-Packard. On HP-UX 11.0,POSIX shell is /bin/sh and BSH is /usr/ol/bin/sh.

The default shell for each major operating system:

Under AIX is the Korn Shell.

The default for Solaris is the Bourne shell.

FreeBSD uses the C shell by default

Hp-ux uses the POSIX shell by default.

Linux is the Bourne Again shell.

Windows PowerShell is a new interactive command line and task-based scripting technology that enables information technology (IT) administrators to fully automate and control system administration tasks, thereby increasing administrator productivity. Windows PowerShell includes multiple system administration utilities, consistent syntax and naming conventions, and better navigation of common administrative data, such as enrollment, certificate storage, or Windows Management Instrumentation (WMI). Windows PowerShell also provides an intuitive scripting language specifically for IT management.

Shell is also a VB function that runs programs with Shell syntax (command string [, window type])

use

Execute the shell using the user’s default credentials and environment.

In the UEFI environment, the Shell environment of EFI provides a rich set of extended and enhanced commands. In the future, the traditional DOS interface will be replaced by the Shell environment, and all. Exe files will not appear in shell-supported environments. In SHELL environments, IA32 and X64, 32-bit *. Efi files will not run on X64 computers.

Home page: Ali Yun University

Start learning: Shell programming from beginner to master