How to Create Bash Aliases
Bash aliases let you shorten long commands into short, memorable shortcuts. This guide covers alias syntax, persistent aliases in .bashrc, and functions.
Bash scripting, shell fundamentals, automation patterns, and common pitfalls.
A complete guide to the Bash for loop: standard syntax, C-style loops, arrays, ranges, break and continue, and real-world scripting patterns.
Use source (or its dot shorthand) to run a file in your current shell, reload .bashrc, share functions between scripts, and load environment variables.
~/.bashrc controls aliases, functions, prompts, and other interactive Bash settings. See when it runs, what belongs inside, and how to debug it.
Bash aliases let you shorten long commands into short, memorable shortcuts. This guide covers alias syntax, persistent aliases in .bashrc, and functions.
Add a directory to the PATH variable in Linux, temporarily or permanently, covering ~/.local/bin, custom binaries, and system-wide changes for all users.
Understand the difference between .bashrc and .bash_profile, when each file is loaded, and where to put aliases, PATH changes, and environment variables.
Append text to a file in Bash without erasing existing content. Covers >>, echo, printf, tee -a for protected files, and combining multi-line heredocs.
Practical Bash best practices for writing safer and more predictable scripts, covering strict mode (set -euo pipefail), quoting, error handling, and everyday patterns.
Redirecting stderr to stdout in Bash using 2>&1, &>, and other operators. Covers file descriptors, appending, piping errors, and discarding output with /dev/null.
Print text, variables, script arguments, and exit codes with echo in Linux, plus escape sequences, colored output, and quoting pitfalls to avoid.
A Bash shebang tells Linux which interpreter runs a script. See what #!/bin/bash means, how /usr/bin/env bash differs, and what happens without #!.
Learn how Bash positional arguments work, including $0, $1, $#, "$@", "$*", shift, default values, and function arguments in shell scripts.