Back to courses

Bash Scripting: Learn Shell Scripting

Learn Bash Scripting from scratch, from an industry expert. You'll learn Shell Scripting fundamentals, master the command line, and get the practice and experience you need to go from beginner to being able to get hired as a DevOps Engineer, SysAdmin, or Network Engineer!

Last updated: March 2023

Course overview

We guarantee you that this is the most comprehensive and up-to-date online resource to learn Bash Scripting and get hired as a SysAdmin, DevOps Engineer, or Network Engineer.

What you'll learn

  • Learn and understand the power of shell scripting
  • Write your own Bash scripts to automate admin tasks such as data backup and restoring, email alerts, user administration, and security auditing
  • Hands-on practice with coding challenges, demos, and quizzes with solutions
  • Master command line skills needed to efficiently work with multiple programming languages
  • Learn one of the most in-demand skills for DevOps Engineers, Network Engineers, and SysAdmins
  • Have the skills and understanding of Bash to confidently apply for jobs

Bash stands for "Bourne Again SHell", and is a replacement/improvement of the original Bourne shell.

This Bash course covers all the Shell Scripting best practices and trends for 2023 and is focused on efficiency.

That means you'll never have to spend time on confusing, out-of-date, incomplete tutorials anymore.

Instead, we'll quickly push you beyond the basics so that you can learn how to work in the real world and become a SysAdmin, DevOps Engineer, or Network Engineer.

The success stories speak for themselves.

Graduates of Zero To Mastery are now working at Google, Tesla, Amazon, Apple, IBM, Uber, Facebook, Shopify + other top tech companies.

They are also working as top freelancers getting paid while working remotely around the world.

This can be you.

By enrolling today, you’ll also get to join our exclusive live online community classroom to learn alongside thousands of students, alumni, mentors, TAs and Instructors.

Most importantly, you will learn from a senior industry professional that has actual real-world experience working with Linux Shell Scripts.

Why Should I Learn Bash Scripting?

We like you already. Asking those smart questions!

The Linux command line is provided by a program called the shell. The most commonly used shell is the Bourne-Again Shell (aka Bash... how clever)!

A script is a series of commands that the Bash program reads and executes line-by-line.

What do you get when you combine them? Bash Scripting!

Bash Scripting is an important part of process automation in Linux (and all operating systems). Scripting helps you write a sequence of commands in a file and then execute them.

This saves you time because you don't have to write certain commands again and again. You can perform daily tasks efficiently and even schedule them for automatic execution.

How sweet is that?

And as with any programming language, Bash Scripting has rules to create programs understandable by the computer. Once you learn those rules, you'll be able to wield the power of Linux Shell Scripting.

If you want to learn Shell Scripting, Bash is the best place to start.

It's also one of the most in-demand skills for Systems Administrators, DevOps Engineers, Network Engineers, and any other job that requires Linux.

Command line skills are also hot in cloud technologies these days, as cloud services are often connected to, and operated through, a command line interface.

You know what that means: great job prospects!

Here's what this Shell Scripting course covers:

This course, like all Zero To Mastery courses, will constantly be updated as the landscape changes.

As Bash Scripting best practices evolve, this course will also be continually updated with lectures and resources.

This will be your go-to place to find the latest Bash Scripting tutorials and resources any time in the future.

Here's some of what you'll learn about Bash coding:

1. SHELL SCRIPTING FUNDAMENTALS - What is Shell Scripting? What is Bash Scripting? Why is Scripting important? How is Bash Scripting used in jobs? These questions and more are answered in detail.

You've got to drill down into the basics before you can get to mastery.

2. ADVANCED TECHNIQUES INCLUDING BASH VARIABLES, LOOPS, FUNCTIONS, SHELL EXPANSIONS & OPERATIONS - Then you'll dive into all the advanced scripting techniques you'll need to become a master of Bash Scripting.

Everything from Bash Loops to Bash Functions and everything in between is covered in-depth. By the end of this course, you'll be able to Bash with your eyes closed.

3. HANDS-ON LEARNING (INCLUDING DEMOS, EXERCISES, AND QUIZZES) - The best part is that you're going to be learning everything through hands-on learning techniques including challenges, hands-on demos, exercises, and quizzes with a total of over 150 questions!

With this much hands-on learning, you can be confident when using your shell scripting skills in the real world.

What's the bottom line?

This course is not about making you just code along or watch endless tutorials. No!

This course will push you and challenge you to go from an absolute beginner in Shell Scripting to a master of Bash Scripting that is in the top 10% of DevOps Engineers, SysAdmins, and Network Engineers 💪.

And you have nothing to lose. You can start learning right now and if this course isn't everything you expected, we'll refund you 100% within 30 days. No hassles and no questions asked.

When's the best time to get started? Today!

There's never a bad time to learn in-demand skills. But the sooner, the better. So start learning Bash and Shell Scripting today by joining the ZTM Academy. You'll have a clear roadmap to developing the skills to build your own projects, get hired, and advance your career.

Start learning now
Expand Overview

What you'll build

The best way you learn is by doing. Not just watching endless tutorials. That's why a key part of this course is the real-world project that you'll get to build and the challenges you'll complete to practice your skills.

Protect Yourself from Hackers

Protect Yourself from Hackers

You’ll automate packet filtering based on source IP addresses...that means you'll be able to drop packets coming from malicious actors so that your network remains secure!

Brace Expansion

Brace Expansion

You’ll generate the directory and file structure for the logs of an application using an automated approach.

Testing Network Connections

Testing Network Connections

You’ll test the Network Connection with any IP address or domain by using programming structures such as loops and specific Bash test conditions.

System Administration using Bash Menus

System Administration using Bash Menus

This is a super useful project that you won't want to miss! You’ll automate the administration of your Linux servers using Bash scripting. This will be like your Control Panel, where you'll be able to see and change many aspects of your operating system.

User Account Creation

User Account Creation

You’ll learn to automate the creation of groups and users for your operating system. This is a super common administrative task, so mastering this project will help you be more efficient and save time!

+ 3 more exciting projects to practice your new skills

start learning now

Course curriculum

To make sure this course is a good fit for you, you can start learning Shell Scripting for free right now by clicking any of the PREVIEW links below.

Introduction

4 lectures

Bash Scripting: Learn Shell Scripting2:39

PREVIEW

Course Goals3:41

PREVIEW

Exercise: Meet Your Classmates and Instructor

START

How-to's: Speed up videos, Downloading videos, Subtitles

START

Section 01: Intro to Bash Shell Scripting

11 lectures

Bash Aliases8:24

PREVIEW

Quiz for Bash Aliases

PREVIEW

Shell and Scripts5:31

PREVIEW

Creating Your First Script and Changing the PATH8:56

PREVIEW

Quiz for Shell, Scripts and PATH

PREVIEW

The Bash Shebang4:00

PREVIEW

Comments in Bash3:50

PREVIEW

Running Scripts4:27

PREVIEW

Quiz for Shebang, Comments and Running Scripts

PREVIEW

Challenges: Intro to Bash

START

Unlimited Updates

START

Section 02: Variables

11 lectures

Variables in Bash9:23

START

Variable Expansion and Quoting9:47

START

Environment and Shell Local Variables9:24

START

Getting User Input6:37

START

Quiz for Variables and User Input

START

Positional Parameters9:42

START

Project: How to Protect Yourself from Hackers6:24

START

Special Parameters3:54

START

$@ vs. $*5:35

START

Quiz for Positional Parameters

START

Challenges: Variables

START

Section 03: Shell Expansions

15 lectures

Intro to Expansions2:07

START

Brace Expansion: String Lists3:47

START

Brace Expansions: Sequence Lists3:10

START

Project: Brace Expansion6:46

START

Exercise: Imposter Syndrome2:55

START

Tilde, Parameter and Variable Expansions5:48

START

Quiz for Brace and Variable Expansions

START

Command Substitution6:14

START

Arithmetic Expansion4:31

START

Process Substitution3:24

START

Quiz for Command and Process Substitution and Arithmetic Expansion

START

Word Splitting5:22

START

Filename Expansion (Globbing)11:11

START

Quiz for Word Splitting and Globbing

START

Challenges: Shell Expansions

START

Section 04: Shell Operation in Depth

10 lectures

Intro to Shell Operation2:25

START

Tokenization4:36

START

Command Identification6:39

START

Quiz for Tokenization and Command Identification

START

Shell Expansions1:02

START

Quote Removal2:42

START

Redirections: Stdin and Stdout Redirections7:09

START

Stderr Redirection8:51

START

Quiz for Quote Removal and Redirections

START

Full Recap: Hands-on Example8:03

START

Section 05: Program Flow in Bash

14 lectures

If, Elif and Else Statements11:55

START

Arithmetic Comparisons3:56

START

Multiple Condition Tests and Nested if/then Statements8:00

START

String Comparisons (Part 1)6:21

START

String Comparisons (Part 2)2:54

START

Quiz for If, Elif and Else Statements

START

Project: Testing Network Connections4:42

START

The Case Statement11:21

START

Menus in Bash (The Select Statement)6:11

START

Quiz for Case and Select

START

Project: System Administration Script Using Menus12:08

START

List of Commands9:31

START

Running a DOS Attack Without root Access (ulimit)5:44

START

Challenges: Flow Control

START

Section 06: Loops in Bash

18 lectures

For Loops (Part 1)4:53

START

For Loops (Part 2)6:43

START

Quiz for For Loops

START

Project: Dropping a List of IP Addresses Using a For Loop5:00

START

While Loops (Part 1)8:24

START

While Loops (Part 2)9:06

START

Project: Dropping a List of IP Addresses Using While and Process Substitution4:28

START

Loops with Break7:07

START

Loops with Continue2:23

START

Quiz for While Loops

START

Intro to Bash Arrays7:05

START

Arrays in Depth8:46

START

Quiz for Arrays

START

Using the Readarray Command5:01

START

Iterating Over Arrays3:16

START

Quiz for Readarray

START

Project: Account Creation8:37

START

Challenges: Loops

START

Section 07: Functions in Bash

5 lectures

Intro to Bash Functions3:24

START

Function's Arguments5:30

START

Variable Scopes in Functions4:15

START

Quiz for Functions

START

Challenges: Functions

START

Where To Go From Here?

6 lectures

Thank You!

START

Review This Course!

START

Become An Alumni

START

Learning Guideline

START

LinkedIn Endorsements

START

Coding Challenges

START

Appendix: Linux Installation Guide

5 lectures

Installing Ubuntu in a VM13:21

START

Things To Do After Installing Ubuntu10:16

START

Running a Linux Server in the Cloud7:26

START

Securing SSH with Key Authentication5:08

START

DigitalOcean Referral Link and Ubuntu Download Link (OVA File)

START

Appendix: Using the VIM Editor

3 lectures

The Basics of VIM Text Editor8:46

START

The VIM Editor In-Depth - Part 18:56

START

The VIM Editor In-Depth - Part 25:49

START

Appendix: Cron, Anacron and Automation

2 lectures

Task Automation and Scheduling Using Cron (crontab)14:50

START

Scheduling Tasks Using Anacron (anacron)6:45

START

Appendix: Netfilter and Iptables Firewall

16 lectures

Introduction to Netfilter and Iptables2:36

START

Chain Traversal in a Nutshell1:38

START

Iptables Basic Usage10:54

START

Iptables Options (Flags) - Part 17:28

START

Iptables Options (Flags) - Part 26:38

START

Where Do We Write Iptables Rules12:53

START

Setting the Default Policy6:53

START

Deleting the Firewall3:39

START

Filter by IP Address10:55

START

Filter by Port15:38

START

Intro to Stateful Firewalls (Connection Tracking)3:33

START

Implementing Stateful Firewalls and Iptables7:37

START

Filter by MAC Address8:34

START

Match by Date and Time9:07

START

The ACCEPT and DROP Targets5:29

START

The LOG Target6:21

START

Meet your instructor

Your Bash Scripting instructor (Andrei) isn't just an expert with years of real-world professional experience. He's also a professional educator. He makes complex topics feel simple. He will motivate you. He will push you. And he will go above and beyond to help you succeed.

Andrei Dumitrescu

Hi, I'm Andrei Dumitrescu!

Andrei is a Senior Network & Software Engineer with 15+ years of experience and over 50,000+ students have taken at least one of his top-rated courses.

SEE MY BIO & COURSES

Andrei Dumitrescu

DevOps Engineer

Frequently asked questions

Are there any prerequisites for this course?

  • Basic Linux knowledge is required (which you can get in our Linux course, included as part of your ZTM Academy subscription)
  • A computer (Windows, Mac, or Linux) with an internet connection

Who is this course for?

  • Anyone interested in working as a DevOps Engineer, SysAdmin, or Network Engineer
  • Anyone who wants to learn skills useful for cloud platforms like AWS, Azure, and Google Cloud Platform
  • DevOps Engineers, SysAdmins, and Network Engineers who want to learn Bash Scripting and be able to add a new skill to their resume and toolkit
  • Students who are stuck in tutorial hell and want to go beyond all the beginner Bash Scripting tutorials
  • Anyone interested in being able to use the command line to efficiently and effectively complete tasks across multiple programming languages
  • Anyone interested in working at companies that utilize the cloud
  • Bootcamp or online tutorial graduates that want to go beyond the basics
  • You want to learn from an industry professional who actually has real-world industry experience, not just another online instructor that teaches off of documentation

Do you provide a certificate of completion?

We definitely do and they are quite nice. You will also be able to add Zero To Mastery Academy to the education section of your LinkedIn profile as well.

Can I download the videos?

Definitely. You can download any and all lessons for personal use. We do everything we can to make learning easy, fun and accessible. Whether that’s on your commute, on a flight or just when you have limited access to good WiFi.

Still have more questions about the Academy?

Still have more questions specific to the Academy membership? No problem, we answer some more here.

Take the next step and invest in a better you

Choose your currency:
$ USD US Dollar
Monthly
100% OFF$39 / month
$39 / month
You're ready to upskill and advance your career
Start Learning Now
Save 40% vs. monthly (that's $189 a year)
Annual
100% OFF$279 / year
$279 / year
$23 / month
You're committed to getting hired and starting a career in tech
Start Learning Now
Lifetime
100% OFF$999
$999
Only pay once, ever
You're serious about advancing your career and never getting left behind
Start Learning Now

Every ZTM membership includes:

Unlimited access to all courses, workshops, and career paths
Invite to private Discord with 400,000+ members
Access to private Linkedin networking group
Custom ZTM course completion certificates
Download all lessons for offline learning
Unlimited, priority access to all future courses, content, and features
100% RISK FREE

We know you'll love ZTM. That's why we provide a no hassle, 30-day money back guarantee.