Command to Start Bourne Again Shell

What is bash (Bourne Again Beat out)?

Bash (Bourne Again Shell) is the complimentary and enhanced version of the Bourne shell distributed with Linux and GNU operating systems. Bash is like to the original, but has added features such as control-line editing.

Created to improve on the before Bourne shell (named sh), Fustigate includes features from the Korn beat out and the C shell. Bash is intended to arrange to the beat standard specified equally function of IEEE POSIX. A command language script written for the Bourne shell should also run in the fustigate trounce.

Fustigate is released nether the GNU General Public License (GPL), and it is available for most versions of Unix and Linux and versions have been ported to MS-DOS and Windows.

As explained in the Bash Reference Manual, the name bash is an acronym of "Bourne-over again SHell" which is a pun on Stephen Bourne, author of the Bourne shell. Fustigate is a superset of the earlier shell, and generally compatible with Bourne shell programs.

What is a beat?

In computing, a crush plan provides access to an operating system's components. The shell gives users (or other programs) a way to get "inside" the system; the beat out defines the boundary between inside and outside.

There are two types of operating organisation shells:

  • Control-line interface (CLI) shells similar bash offering users a curtailed and efficient mode of interacting with the OS, without requiring the overhead of a graphic user interface.
  • Graphical user interface (GUI) shells, such as Windows and macOS, are considered easier for beginners to utilize, but usually also offer programs that emulate a CLI-based shell for system administrators or other ability users who adopt to interact at a control prompt.

Bash is the most commonly used CLI shell for Unix-based OSes, including Linux.

What is bash used for?

Bash, similar other CLIs, is used for any computer application that requires precision when working with files and data, especially where large numbers of files or large quantities of information need to be searched, sorted, manipulated or processed in whatever mode.

Some of the well-nigh common Bash use cases include:

  • Organization administrators employ Fustigate to manage systems systematically and reproducibly. Organization administrators use Fustigate to troubleshoot systems that are not functioning every bit desired or expected by logging in to systems and reviewing organisation configurations and network connections. Organisation administrators besides rely on Bash scripts to distribute software updates and patches, to monitor running systems, and to update and configure systems.
  • Software developers rely on Bash for many development tasks. Bash can be used to automate software development tasks such as lawmaking compilation, debugging source lawmaking, change management and software testing.
  • Network engineers use Bash to examination, configure and optimize network performance on organizational networks.
  • Computer science researchers use Bash to manage inquiry systems and to acquit out inquiry on those systems.
  • Hobbyists and power users use Bash to collaborate with their systems, execute programs and maintain their systems.

Fustigate is commonly used interactively, merely it can too be used to write crush scripts. Almost whatsoever estimator chore can exist automated using a Fustigate script. Bash scripts can exist run on-demand or scheduled to run periodically.

How does bash work?

At first sight bash appears to be a elementary command/response organisation, where users enter commands and bash returns the results later those commands are run. However, bash is also a programming platform and users are enabled to write programs that have input and produce output using beat out commands in shell scripts.

One of the about basic fustigate commands, ls, does one thing: list directory contents. By itself this command lists only the names of files and subdirectories in the current working directory.

Output from bash ls command without parameters
Output from the fustigate ls command includes only file and directory names.

The ls control has numerous parameters that modify how the results are displayed. Some often used parameters used with the ls command include:

ls control-line arguments (parameters)

Purpose

-fifty

Utilise a longer, more than detailed, listing format to include file permissions, file possessor, group, size and date/time of creation.

-a

List all files and subdirectories, even those that are usually intended to be hidden.

-s

Display the size of each file.

-h

Display file and subdirectory sizes in human-readable format using K, Chiliad, One thousand and so on to indicate kilobytes, megabytes and gigabytes.

-R

Recursive listing of all files and subdirectories under the electric current working directory.

Used all together, these parameters requite the user a much clearer sense of what files and subdirectories are in a directory, when they have last been changed and by whom.

Bash piping pipes
Use pipes to filter out the desired data from bash commands.

Bash enables combining commands by piping output of one command to be used as the input for some other command. For example, this command can be used to list all files on a file system using the -R parameter to specify the list should be recursive:

[email protected]:/$ 1s -1ashR

The response to this command, especially when issued from the system root directory, contains as well many entries for humans to parse easily. This is where pipes can come into play, in this case, the user can pipe the output from the ls command to the Bash text blueprint matching control, grep.

The pipage symbol (vertical bar, or "|") directs output from the directory listing into the grep control to render merely files and subdirectories with filenames that include the specified text design. This command:

[email protected]:/$ 1s -1ashR |grep 'filename.txt'

returns only files that include the string 'filename.txt' so this command tin be used to locate a specific file.

Some things that are much easier to practice interactively from the fustigate command line include:

  • file and directory management;
  • checking on network configuration;
  • editing a configuration file (or any text file); and
  • showing the deviation between two files.

Types of fustigate commands include:

  • Simple commands, which ordinarily are run past themselves or with parameters and variables. For example, the ls control takes parameters too every bit variables relating to the directories or files to be listed.
  • Pipes, which are used to link the output of 1 or more than commands every bit input to other commands.
  • Lists, which enable users to run multiple commands in sequence.
  • Chemical compound commands, which enable script programming and include loops (for repeating a command a specific number of times) and conditional constructs (for running commands only when a specific status is met).

Command-line editing is i special bash feature not always available with other CLIs. Bash retains a control history, which tin be accessed by pressing the upwardly pointer key. This makes information technology easier to precisely rerun a control. These prior commands tin can besides be modified at the command line, using special keys to copy, paste, delete or change a prior command.

Bash is one of the foundations of modern system and network administration, and new users face up a learning curve when using it. Yet, once learned, fustigate skills are forever: a time-traveling system administrator from 1992 would probable be able to become correct back to work on a modern Linux system, using bash. Learn more about how Fustigate scripting from this tutorial on creating a bash shell that accepts arguments when it runs.

This was last updated in December 2021

Keep Reading About bash (Bourne again crush)

  • A wait at the main differences of Bourne beat vs. Bash
  • Larn shell scripts: A sys admin's guide to automation
  • PowerShell vs. Fustigate: Key differences for Windows deployments
  • Combine PowerShell and Docker to simplify testing across OSes
  • GNU Fustigate manual

Dig Deeper on Data center ops, monitoring and management

  • batch file

    Past: Rahul Awati

  • command-line interface (CLI)

    By: Peter Loshin

  • How to script a Bash Trounce argument

    Past: Jack Wallen

  • Use Docker and Alpine Linux to build lightweight containers

    Past: Stuart Burns

suhthicithe.blogspot.com

Source: https://www.techtarget.com/searchdatacenter/definition/bash-Bourne-Again-Shell

0 Response to "Command to Start Bourne Again Shell"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel