
Master bash scripting from basics to expert, writing your own scripts to automate administrative tasks, with variables, expansions, quoting, and control flows, plus hands-on projects.
Explore bash aliases as shortcuts for frequent commands, learn how to list, create, persist, and remove aliases, and apply practical examples like ssh, ports, and root access.
Clarify what the bash shell is and how it differs from shell scripts. Then show how shell scripting automates repetitive admin tasks like backups and monitoring.
Create your first shell script in your home directory, make a directory and file, list contents, and add the script directory to PATH for easy execution.
Discover how the shebang line specifies the interpreter for a script, enabling explicit paths like /bin/bash or /usr/bin/python3 and overriding the default shell.
Learn how to use comments in bash, including the hash rule and shebang, and apply practical tips for multi-line comments and debugging with vim line numbers.
Learn how to create and manipulate bash variables, quote values with spaces, avoid spaces around equals, declare read-only constants, and follow lowercase with underscores for variables and capitals for constants.
Master bash variable expansion and quoting by learning how to assign and reference variables, and how the dollar sign enables parameter, command, and arithmetic expansion with single and double quotes.
Learn how environment variables and shell local variables shape the bash session, view and export them with env, printenv, and set, and create global variables for scripts.
Learn to prompt for and read user input in bash with the read command, including single and multi-variable reads, prompts (-p), hidden input (-s), and a practical iptables script.
Learn how Bash positional parameters access script arguments using $1, $2, $0, and ${10}, with defaults, and see an example that displays and compresses a file.
Create a bash script to block malicious connections by dropping packets from a user-provided IP, network, or domain with iptables, and adapt it to accept command-line arguments for automation.
Explore special bash parameters such as $0, $@, $*, $#, and $$, including differences between $@ and $*, and how $? and $$ reflect exit status and process IDs.
Explain the differences between $ and $* in bash, highlighting how unquoted expansions trigger word splitting and how quotes prevent it. Demonstrate with examples and advise using the quoted dollar.
Explore bash shell expansions from tokenization to quote removal, master expansion types: brace expansion, tiled expansion, parameter and variable expansion, command substitution, arithmetic expansion, process substitution, word splitting, and globbing.
Explore brace expansion as the shell's first expansion that generates arbitrary strings as string lists. Explore the second type, range or sequence lists.
Learn bash brace expansion to generate number or letter sequences inside curly braces, with optional increments and zero-padding, including reversed order, noting that expansion precedes variable expansion.
Explore brace expansion to automate creating a daily log directory structure under /var/log/app for January, February, and March, with a log.daily file in each day, using only two commands.
Master Bash teaches tilde and brace expansions, parameter expansions with default values, and case-changing operators, using OS and PWD examples to map home, current, previous, and stack directories.
Learn command substitution in bash, using backticks or $() to assign command output to variables. Explore practical examples like piping, archiving with date-timestamped names, and quoting to preserve strings.
Master bash arithmetic expansion by evaluating expressions and substituting results, with examples of let usage and operator precedence. Learn integer-only limits, overflow, and using bc with here string for decimals.
Explain process substitution, the next step after arithmetic expansions, to reference a process output as a file and feed it into another command, as shown with diff on two directories.
Explain how bash performs word splitting after unquoted brace and variable expansions, using the IFS delimiter (default space, tab, newline) to split results, and how quotes prevent splitting.
Learn bash filename expansion, or globbing, using the star, the question mark, and square brackets to match file names after word splitting, with quoting and negation rules.
Explore how the bash shell reads and executes commands, from tokenization and alias expansion to command identification and eight stages of shell expansions, redirections, and exit status.
Tokenization breaks input into words and operators using unquoted metacharacters, producing tokens; redirection and control operators guide execution, with alias expansion during tokenization.
Identify simple and compound commands after tokenization. Simple commands are word sequences terminated by a newline or control operator; compound commands start with reserved words like if or while.
Explore shell expansions in Master Bash, detailing types—brace expansion, tiled expansion, parameter and variable expansion, command substitution, arithmetic expansion, process substitution, word splitting, and filename expansion (globbing)—ending with code removal.
Learn quote removal after shell expansions, including unquoted backslashes and how to print literals like $user by escaping or quoting. Understand how single and double quotes are treated during removal.
Explain how stdin, stdout, and standard error form the three data streams, and demonstrate input and output redirection with <, >, and >> to files, including file creation and appending.
learn how to redirect standard error with stream numbers, overwrite and append error files, and combine stdout and stderr using pipes and the t command for dual output.
Master bash conditional statements with if, elif, and else to add logic to scripts, test file types and permissions, and build practical automation menus.
Master bash arithmetic comparisons by using integer tests with if/elif/else and double square brackets, employing operators -eq, -ge, -gt, -lt, -le, -ne in an age-check script.
Master Bash teaches multiple condition tests and nested if-then statements, using and/or operators, single and double square brackets, and robust argument handling to validate ages and differentiate files and directories.
Master bash teaches string comparisons using single and double brackets, the single and double equal signs, quoting to prevent word splitting, and substring checks with wildcards.
Learn to test command-substitution results for empty or non-empty strings using bash [[ ]] with -z and -n, plus practical examples showing zero and nonzero length messages.
Develop a bash script using command substitutions, string comparisons, and if-else logic to test network connectivity to an ip with ping and optionally email the admin when it fails.
Explore how the bash case statement tests strings and numbers, replacing if-else blocks with a switch-like construct using patterns and defaults. See practical scripts for pet input.
Build bash menus using the select statement and case logic to present options, capture the choice in a reply variable, and support a quit option.
Build a menu-driven system administration script in bash that adds users, lists and kills processes, and installs programs, using a select-based interface and robust status checks.
Master bash by learning to chain commands on a single line using semicolon, ampersand, double ampersand, and double vertical bar, understanding sequential, asynchronous, and conditional execution.
Explore how a forkbomb denial of service attack can crash a Linux system from an unprivileged user and how to mitigate it with ulimit settings and hard nproc limits.
Explore the concept of loops in bash, focusing on for loops that iterate over lists and ranges, with examples using strings, spaces handling, and file creation.
Explore for loops in bash by iterating command output, listing and displaying files, and renaming txt files. Learn different loop forms, including command substitution and C-style loops.
Learn to drop packets from a list of IP addresses using a bash for loop and iptables, including file-based IPs and command substitution.
Learn how to use the while loop in bash, including test conditions, the do and done blocks, and arithmetic expansion, with examples that check processes and prevent infinite loops.
Explore how Bash while loops execute between do and done, driven by a command's return status, including ping, read, and process substitution.
Block a list of ip addresses using a while loop and process substitution to read ips.txt, then apply iptables rules to drop packets and test with ping.
Learn how break and continue control bash loops, exiting early or skipping iterations to optimize tasks like searching a list or handling infinite loops.
Explore how bash uses break and continue to control loops, implement a range 1 to 15, test for odd numbers with modulus, and print the results.
Explore bash arrays, including one-dimensional indexed and associative arrays, and learn how to create, access, and print them. Learn zero-based indices, sparse arrays, and removing elements with unset.
Explore advanced bash arrays by creating and modifying numerically indexed and associative arrays, performing slices, appending with plus equals, printing keys, querying values, and enforcing read-only arrays with declare -r.
Learn to use the read array command to convert input into an indexed array, including file contents and command output, with process substitution and the -t option for trimming newlines.
Master Bash shows how to iterate over arrays with a for loop, handle file paths and spaces, and guard against directories using -f and -r checks.
Automate user and group creation with a Bash script that reads a text file into an array, iterates to create each user and group, and checks existence before adding.
Explore bash functions to organize code, enable modularity and reuse, define functions with or without the function keyword, call by name, and run scripts with execution permission.
Learn how bash functions receive arguments via $1, $2, and how to pass data by calling functions; understand return status vs command substitution for values.
Master bash variable scopes by exploring how functions access global variables and how to declare locals with the local keyword to contain changes.
Install Ubuntu in a virtual machine with VirtualBox, meeting at least 4 GB RAM and 25 GB disk space, from downloading the ISO to starting the VM.
Update Ubuntu with sudo apt update and sudo apt full-upgrade; install VirtualBox guest additions for better performance and clipboard support; use snapshots to roll back changes.
Set up a Linux server in the cloud by creating a DigitalOcean droplet with Ubuntu, selecting a region and static IP, and configuring SSH authentication, backups, and remote access.
Secure a DigitalOcean droplet by generating an RSA 2048-bit SSH key pair with ssh-keygen, adding the public key via ssh-copy-id, and disabling password authentication.
Unlock the full power of Linux and master the art of Bash Scripting with this complete, hands-on Bash Shell Programming course!
Whether you're an absolute beginner or an experienced sysadmin and DevOps professional, you'll rapidly progress from the basics to advanced Bash Shell scripting techniques, gaining practical skills directly applicable to real-world tasks.
What You’ll Master:
Bash Shell Scripting Fundamentals: Write your first scripts confidently, understand essential syntax, Bash aliases, and effective use of the PATH.
Variables and User Input: Master variable expansion, quoting, environmental variables, positional and special parameters, and create interactive scripts.
Powerful Shell Expansions: Boost productivity using brace, tilde, parameter, arithmetic, command, and process substitutions.
In-Depth Shell Operation: Dive deeply into how Bash processes commands, covering tokenization, expansions, quote removal, and advanced redirection techniques.
Control Program Flow: Implement sophisticated logic with if, elif, else, case, and interactive menus using select. Create robust conditional scripts.
Automate Tasks with Loops: Harness for and while loops to automate repetitive tasks, work with arrays, and perform complex data processing.
Reusable Bash Functions: Develop clean, modular scripts with reusable functions, argument handling, and proper variable scoping.
Real-World Projects for Sysadmin & DevOps:
Solidify your Bash skills with practical, hands-on projects, including:
Protecting your systems from hackers
Automating network connection tests
Building interactive system administration menus
Blocking malicious IP addresses automatically
Creating and managing user accounts efficiently
Course Highlights:
Comprehensive and Structured Curriculum: Beginner-friendly, progressively advancing to expert levels.
Practical, Hands-On Challenges: Learn by doing, with quizzes, projects, and challenges designed for real-world proficiency.
Step-by-Step, Clear Instruction: Complex Bash topics explained clearly, ensuring easy understanding and rapid mastery.
Strong Focus on Automation: Streamline your workflow, enhance productivity, and automate Linux administration tasks effectively.
Who Should Enroll:
Anyone looking to master Bash Programming for personal or career advancement.
Linux System Administrators seeking reliable scripting tools for efficient system management.
DevOps Engineers aiming to strengthen scripting capabilities within Linux environments.
Cybersecurity enthusiasts interested in leveraging Bash for enhanced system security and automation.
By the end of this course, you’ll confidently write robust, secure, and efficient Bash scripts that automate tasks, streamline system administration, and significantly enhance your command-line skills.
Enroll today to elevate your Bash Shell Scripting expertise and take your Linux skills to the next level!