Udemy

Free Bash Scripting Course: Write Your First Linux Script

A command you type once is easy to forget. Put a few commands in a script and you can read them before running them, keep a record of changes, and repeat a task without reconstructing each step. That makes Bash useful even for small jobs, such as checking whether a folder is ready before you start work.

Free learning access

Listed as Free on Udemy when checked on 5 November 2026. No coupon or subscription trial is required for the listed lessons. Enrollment needs a Udemy account; availability can change.

About this course

A command you type once is easy to forget. Put a few commands in a script and you can read them before running them, keep a record of changes, and repeat a task without reconstructing each step. That makes Bash useful even for small jobs, such as checking whether a folder is ready before you start work.

Jason Cannon’s free introductory course takes you from creating a script file to making it choose what to do. It assumes that you can open a command line on a Linux system. You can follow the main lessons with a text editor and a practice directory; you do not need a server or a production task.

Official course Intro to Linux Shell Scripting (Free course)
Created by Jason Cannon
Platform Udemy
Language English
Level Beginner
Listed duration 44 minutes; 6 lectures across 1 sections
Completion terms Not included with a new free enrollment

What you’ll learn

The five main videos cover writing and running a first script, choosing an interpreter with a shebang, recognizing shell builtins, using variables and comments, outlining a longer script in pseudocode, and making decisions with an if statement. The public listing also includes a short bonus article. The main lessons run just over 42 minutes.

Skills you’ll gain

  • Script setup
  • Interpreter selection
  • Shell builtins
  • Variable naming
  • Pseudocode planning
  • Conditional branching

Make the first run predictable

Start by making a file in a practice directory and having it print a single message. The first line can identify Bash as the interpreter when you run the file directly. The execute permission controls whether you can launch the file that way. Keep these two details separate: choosing how to interpret a file and granting permission to execute it solve different problems.

Next, put a short label in a variable and print it. Give the variable a name that explains what it represents. Keep the spelling and capitalization consistent when you refer to it later, because Bash treats differently capitalized names as different names. Add a comment for a choice that might confuse a reader, such as why the script looks in a practice folder.

Write the decision in plain English

Try a separate exercise with a fictional report folder. Write three lines in plain English: find the folder, check whether it exists, and print the appropriate message. Give each line a single job. This small outline helps you see where a decision belongs before you need to remember shell punctuation. You can leave it above the code as a short explanation if it still helps after implementation.

Implement that decision without moving, deleting, or creating real files. Have the script print one message when the practice folder exists and another when it does not. The two branches should describe what the script actually found. In Bash, an if statement follows the success or failure status of the command it runs as its test. A file or directory check is a useful way to see that behavior in action. You can also check a real path by mistake if you reuse a filename from an earlier test. Use a dedicated practice folder and give the example a name you can recognize. That way the output is easier to verify, and you do not need to run the script with administrator privileges.

Check both outcomes before reusing the script

Run the script first with a folder you created for the exercise and then with a path that does not exist. Compare the messages with your prediction. If the result differs, print the value the script is checking and verify it against the path you intended to use. Test a folder name with a space as a separate case, and quote the path when passing it to a command so the name stays together.

Once the results are consistent, keep a copy with a short note showing how to run it and what it checks. The note is useful if you revisit the script later or share it with a colleague. The course offers a foundation for writing small scripts; tools for scheduling work, deployment, and larger projects are good next topics after you can explain each line of your first script.

Enroll Now ↗

Related courses for your next step

Compare course focus, level and study time
Compare the published course outlines. A lower level is a preparation option, not a required prerequisite.
Course Level Focus Study time
This course — Free Bash Scripting Course: Write Your First Linux Script Beginner Script setup · Interpreter selection · Shell builtins 44 minutes (Udemy listing)
Free Linux Command Line Course: Find Files and Manage Permissions Beginner Terminal navigation · Path resolution · File operations 150 minutes (Udemy listing)
Free Git and GitHub Course: Follow Changes from Commit to Code Review Beginner Git staging and commits · Repository history · Branch management 60 minutes (Udemy listing)

Frequently asked questions

Do I need Linux command-line access?

Yes. The course assumes you can open a Linux shell to follow the exercises.

Does it cover scheduling or production automation?

The public outline focuses on the basics of writing and running a script, including a simple conditional.

What should I try first?

Create a short script that prints a message, then add a decision that checks a practice folder.

Share this course

Questions & discussion

Share a useful question or correction. Comments appear after moderation. Please avoid personal or sensitive information.

Add to the discussion

Your email address will not be published. Required fields are marked *