Get the App
SLTechnology News&Howtos  ›  Servers  › 

What does bash mean in linux

Shulou Source: shulou.com Published: 2022-06-01 00:43:38 09月12日 Update

This article mainly introduces what bash means in linux. The article is very detailed and has certain reference value. Interested friends must read it!

Linux bash is a command processor that usually runs in a text window and can execute commands entered directly by the user;Bash can also read commands from files, such files are called scripts; like other Unix shells, it supports filename substitution, pipes, here documents, command substitution, variables, and so on.

Operating environment: linux 5.9.8 system, Dell G3 computer.

Bash, a Unix shell, was written in 1987 by Brian Fox for the GNU Project. The first official version was released in 1989 and was originally intended for GNU, but ran on most Unix-like operating systems, including Linux and Mac OS X v10.4, which used it as the default shell.

Bash is a successor compatible and open-source version of the Bourne shell, and its name comes from a pun for Bourne shell (sh): Bourne-Again SHell.

Bash is a command processor that usually runs in a text window and can execute commands entered directly by the user. Bash can also read commands from files called scripts. Like other Unix shells, it supports file name substitution (wildcard matching), pipes, here documents, command substitution, variables, and conditional and loop control statements. Basic features, including keywords and syntax, are borrowed from sh. Other features, such as the history command, are borrowed from csh and ksh. Overall, Bash, while a POSIX shell, has many extensions.

A security flaw called Shellshock was discovered in early September 2014 and quickly led to a series of attacks on the Internet. The vulnerability dates back to version 1.03, released in 1989.

bash command syntax is a superset of Bourne shell command syntax.

Most of Bourne's vast number of shell scripts can be executed in bash without modification, except for scripts that reference Bourne special variables or use Bourne's built-in commands. bash's command syntax comes from many sources such as the Korn shell (ksh) and C shell (csh), such as command-line editing, command history, directory stacks,$RANDOM and $PPID variables, and POSIX's command substitution syntax: $(...). As an interactive shell, pressing TAB automatically completes partially typed program names, file names, variable names, etc.

Bash's function declaration is incompatible with Bourne/Korn/POSIX scripts when using the 'function' keyword (the Korn shell has the same problem). However, Bash also accepts Bourne/Korn/POSIX function declaration syntax. Because of the many differences, Bash scripts rarely run in Bourne or Korn interpreters unless they are deliberately written to maintain compatibility. However, with the popularity of Linux, this approach is becoming less and less common. However, in POSIX mode, Bash is more POSIX compliant.

That's what bash means in linux. Thank you for reading this article! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to the industry information channel!

Tags: Command file script syntax variable version system run file name input meaning operating system keyword content function history processor text document Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Huawei NVidia Shulou Tech Info Microsoft