Giter Site home page Giter Site logo

bash's Introduction

Bash

Bash stands for "Bourne Again SHell" and is a command processor that typically runs in a text window where the user types commands that cause actions.

Why bash ?

  • Compatibility: Bash is often the default shell on many Unix-based systems, making scripts written in Bash highly portable across different platforms.

  • Powerful Scripting Language: Bash is not just a command interpreter; it is also a powerful scripting language. It supports variables, loops, conditionals, functions, and other programming constructs, making it suitable for writing complex scripts and automating tasks.

  • Extensive Documentation and Community Support: Bash has been around for a long time, and as a result, it has extensive documentation and a large user community.

  • Default Shell on Many Systems: Bash is often the default shell for user accounts on Unix-like systems.

  • Interactive Shell Features: Bash provides a feature-rich interactive shell, offering command history, tab completion, and various customization options.

  • Job Control: Bash supports job control, allowing users to manage multiple processes simultaneously.

  • Extensive Built-in Commands: Bash comes with a wide range of built-in commands, providing functionality for tasks such as file manipulation, text processing, and system administration. This reduces the reliance on external utilities for many common operations.

Terminal vs shell

  • The terminal is the user interface that allows interaction with the computer, while the shell is the program that interprets and executes the commands entered into the terminal. The terminal can exist without a shell, but the shell requires a terminal or similar interface for user interaction

Guide

  1. Find where your bash interpreter is located by entering this command;
  • $ which bash
  • /bin/bash
  1. This command reveals that the Bash shell is stored in /bin/bash.
  2. Every shell command starts with a shebang which points the shell path - #!/bin/bash

Types of shells in Linux

  1. Bourne shell
  2. C shell
  3. Korn Shell
  4. GNU Bourne shell
  • To know which shell your system supports type: cat/etc/shells
  • To know where bash is located in your OS type : which bash

Basic Bash Commands

  1. cd:changes the directory to a different location
  2. ls:lists the contents of the current directory
  3. mkdir:create new directory
  4. touch:create a new file
  5. rm:remove a file or directory
  6. cp:copy a file or directory
  7. mv:move or rename a file or directory
  8. echo:print the text in the terminal
  9. cat:concatenate and print the contents of a file
  10. grep:search for a pattern in a file
  11. chmod:change the permissions of a file or directory
  12. sudo:run a command with admin privileges
  13. df:display the amount of disk space available
  14. history:show the list of previous commands
  15. ps:display information about running processes

bash's People

Contributors

copubah avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.