B

Bash (Bourne Again Shell)

Bash is the default command-line shell on most Linux systems, providing scripting capabilities and system interaction.

What is Bash?

Bash (Bourne Again Shell) is a command-line interpreter and scripting language that serves as the default shell on most Linux distributions and macOS. It provides a text-based interface for system interaction and automation.

Basic Bash Commands

  • Navigation: ls, cd, pwd
  • Files: cp, mv, rm, cat, touch
  • Search: grep, find
  • Permissions: chmod, chown
  • Process: ps, top, kill

Bash Scripting

Bash scripts automate tasks using variables, conditionals, loops, functions, and command substitution.

Common Misconceptions

  • "Bash is the only shell" - zsh, fish, sh also popular
  • "Bash is only for Linux" - Available on macOS, Windows (WSL)
  • "GUI replaces command line" - CLI often more efficient