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!

21 Days

Average time students take to complete this course.

Last updated: March 2024

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 2024 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.

Join Zero To Mastery Now

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

Join Zero To Mastery 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

BEGIN

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

BEGIN

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

BEGIN

Unlimited Updates

BEGIN

Section 02: Variables

11 lectures

Variables in Bash9:23

BEGIN

Variable Expansion and Quoting9:47

BEGIN

Environment and Shell Local Variables9:24

BEGIN

Getting User Input6:37

BEGIN

Quiz for Variables and User Input

BEGIN

Positional Parameters9:42

BEGIN

Project: How to Protect Yourself from Hackers6:24

BEGIN

Special Parameters3:54

BEGIN

$@ vs. $*5:35

BEGIN

Quiz for Positional Parameters

BEGIN

Challenges: Variables

BEGIN

Section 03: Shell Expansions

15 lectures

Intro to Expansions2:07

BEGIN

Brace Expansion: String Lists3:47

BEGIN

Brace Expansions: Sequence Lists3:10

BEGIN

Project: Brace Expansion6:46

BEGIN

Exercise: Imposter Syndrome2:55

BEGIN

Tilde, Parameter and Variable Expansions5:48

BEGIN

Quiz for Brace and Variable Expansions

BEGIN

Command Substitution6:14

BEGIN

Arithmetic Expansion4:31

BEGIN

Process Substitution3:24

BEGIN

Quiz for Command and Process Substitution and Arithmetic Expansion

BEGIN

Word Splitting5:22

BEGIN

Filename Expansion (Globbing)11:11

BEGIN

Quiz for Word Splitting and Globbing

BEGIN

Challenges: Shell Expansions

BEGIN

Section 04: Shell Operation in Depth

10 lectures

Intro to Shell Operation2:25

BEGIN

Tokenization4:36

BEGIN

Command Identification6:39

BEGIN

Quiz for Tokenization and Command Identification

BEGIN

Shell Expansions1:02

BEGIN

Quote Removal2:42

BEGIN

Redirections: Stdin and Stdout Redirections7:09

BEGIN

Stderr Redirection8:51

BEGIN

Quiz for Quote Removal and Redirections

BEGIN

Full Recap: Hands-on Example8:03

BEGIN

Section 05: Program Flow in Bash

14 lectures

If, Elif and Else Statements11:55

BEGIN

Arithmetic Comparisons3:56

BEGIN

Multiple Condition Tests and Nested if/then Statements8:00

BEGIN

String Comparisons (Part 1)6:21

BEGIN

String Comparisons (Part 2)2:54

BEGIN

Quiz for If, Elif and Else Statements

BEGIN

Project: Testing Network Connections4:42

BEGIN

The Case Statement11:21

BEGIN

Menus in Bash (The Select Statement)6:11

BEGIN

Quiz for Case and Select

BEGIN

Project: System Administration Script Using Menus12:08

BEGIN

List of Commands9:31

BEGIN

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

BEGIN

Challenges: Flow Control

BEGIN

Section 06: Loops in Bash

18 lectures

For Loops (Part 1)4:53

BEGIN

For Loops (Part 2)6:43

BEGIN

Quiz for For Loops

BEGIN

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

BEGIN

While Loops (Part 1)8:24

BEGIN

While Loops (Part 2)9:06

BEGIN

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

BEGIN

Loops with Break7:07

BEGIN

Loops with Continue2:23

BEGIN

Quiz for While Loops

BEGIN

Intro to Bash Arrays7:05

BEGIN

Arrays in Depth8:46

BEGIN

Quiz for Arrays

BEGIN

Using the Readarray Command5:01

BEGIN

Iterating Over Arrays3:16

BEGIN

Quiz for Readarray

BEGIN

Project: Account Creation8:37

BEGIN

Challenges: Loops

BEGIN

Section 07: Functions in Bash

5 lectures

Intro to Bash Functions3:24

BEGIN

Function's Arguments5:30

BEGIN

Variable Scopes in Functions4:15

BEGIN

Quiz for Functions

BEGIN

Challenges: Functions

BEGIN

Where To Go From Here?

6 lectures

Thank You!

BEGIN

Review This Course!

BEGIN

Become An Alumni

BEGIN

Learning Guideline

BEGIN

LinkedIn Endorsements

BEGIN

Coding Challenges

BEGIN

Appendix: Linux Installation Guide

5 lectures

Installing Ubuntu in a VM13:21

BEGIN

Things To Do After Installing Ubuntu10:16

BEGIN

Running a Linux Server in the Cloud7:26

BEGIN

Securing SSH with Key Authentication5:08

BEGIN

DigitalOcean Referral Link and Ubuntu Download Link (OVA File)

BEGIN

Appendix: Using the VIM Editor

3 lectures

The Basics of VIM Text Editor8:46

BEGIN

The VIM Editor In-Depth - Part 18:56

BEGIN

The VIM Editor In-Depth - Part 25:49

BEGIN

Appendix: Cron, Anacron and Automation

2 lectures

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

BEGIN

Scheduling Tasks Using Anacron (anacron)6:45

BEGIN

Appendix: Netfilter and Iptables Firewall

16 lectures

Introduction to Netfilter and Iptables2:36

BEGIN

Chain Traversal in a Nutshell1:38

BEGIN

Iptables Basic Usage10:54

BEGIN

Iptables Options (Flags) - Part 17:28

BEGIN

Iptables Options (Flags) - Part 26:38

BEGIN

Where Do We Write Iptables Rules12:53

BEGIN

Setting the Default Policy6:53

BEGIN

Deleting the Firewall3:39

BEGIN

Filter by IP Address10:55

BEGIN

Filter by Port15:38

BEGIN

Intro to Stateful Firewalls (Connection Tracking)3:33

BEGIN

Implementing Stateful Firewalls and Iptables7:37

BEGIN

Filter by MAC Address8:34

BEGIN

Match by Date and Time9:07

BEGIN

The ACCEPT and DROP Targets5:29

BEGIN

The LOG Target6:21

BEGIN

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.

Are there subtitles?

Yes! We have high quality subtitles in 11 different languages: English, Spanish, French, German, Dutch, Romanian, Arabic, Hindi, Portuguese, Indonesian, and Japanese.

You can even adjust the text size, color, background and more so that the subtitles are perfect just for you!

Still have more questions about the Academy?

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

Invest in a better you. For less than a coffee a day.

Choose your currency:
$ USD US Dollar
Lifetime
100% OFF$999
$999
Only pay once, ever
You're serious about advancing your career and never getting left behind
Start Learning Now

MOST POPULAR

Save 40% vs. monthly (that's $189 a year)
Annual
100% OFF$279 / year
$23 / month
$279 / year
You're committed to getting hired and starting a career in tech
Start Learning Now
Monthly
100% OFF$39 / month
$39 / month
You're ready to upskill and advance your career
Start Learning Now

Every ZTM membership includes:

Unlimited access to all courses, projects + workshops, and career paths
Access to our private Discord with 400,000+ members
Access to our private LinkedIn networking group
Custom ZTM course completion certificates
Live career advice sessions with mentors, every month
Full 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.