Bash Scripting, Linux and Shell Programming Complete Guide
4.3 (381 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
28,640 students enrolled

Bash Scripting, Linux and Shell Programming Complete Guide

Bash scripting provides programming for the most popular operating system in the world. Linux is the most popular OS
4.3 (381 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
28,640 students enrolled
Created by Frahaan Hussain
Last updated 6/2019
English [Auto]
Current price: $139.99 Original price: $199.99 Discount: 30% off
23 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 3 hours on-demand video
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Bash Scripting
  • Linux Programming
  • Shell Scripting
  • Application Programming
  • Scripting
  • Cross Platform Development
  • Terminal Commands
  • Unix Commands
  • Command Prompts
  • Semantics of General Programming
  • The Format of Coding Applications
  • All The Features of Bash Scripting
Course content
Expand all 59 lectures 03:00:15
+ Introduction
2 lectures 08:04

Course introduction

Preview 02:20

Learn about the differences between Bash, Shell, Command Line and Terminal.

Preview 05:44
+ Navigation
8 lectures 18:53

Whenever it's required to take a look at the contents of a directory on the command line in Linux, ls is the command that's used. It lists the contents sorted in alphabetical order.

Listing Folder Contents (ls)

The pwd command, like ls and cd, is one of the most frequently used Linux utilities. Regardless of the kind of user you are (newbie or pro), you'll find yourself using this command line tool a lot. So in this tutorial, we will quickly discuss the basics of pwd through some easy to understand examples.

Print Current Folder (pwd)

The cd command is one of the most frequently used commands in Linux, as it's used to change directories (one of the most basic command line operations). While most users restrict themselves to the basic usage of cd, there are many other features the tool provides.

Preview 03:28

The pushd command stores a directory path in the directory stack while the popd command removes the top directory path from the same stack. In addition, both these commands make the directory being working on as your new working directory.

Using A Stack To Push Folders (pushd/popd)

While working on the Linux command line, there may be times when you'd encounter a file which is an archive (say a .zip file), but its extension (or lack of it) would suggest otherwise. It's in times like these, the file command proves helpful as it lets you determine the actual file type.

Check File Type (file)

While find is no doubt one of the most popular as well as powerful command line utilities for file searching in Linux, it not fast enough for situations where-in you need instantaneous results. If you want to search a file on your system through the command line, and speed is the top most priority, then there's another command that you can use: Locate.

Find File By Name (locate) & Update Locate Database (updatedb)

The which command in Linux lets users know about the absolute path of command line tools.

Preview 02:04

If your work involves running tools and scripts on the Linux command line, I am sure there are a lot of commands you would be running each day. Those new to the command line should know there exists a tool - dubbed history - that gives you a list of commands you've executed earlier.

Show Command History (history)

Time to test your knowledge on navigation

Quiz 1 - Navigation
3 questions
+ Getting Help
3 lectures 05:10

Man pages are one of the most useful resources when it comes to understanding command line utilities. A man page, however, contains a lot of details about the command. There may be times when you'd want to quickly know - may be in a small line or so - what a command line tool does. Well, you'll be glad to know there exists a command that's specifically built for this purpose.

Preview 01:28

In Linux, if you ever need help regarding a command, all you need to do is to open its man page. But what if a situation arises wherein the requirement is to quickly search the names and descriptions of all available man pages? Well, Linux has got your covered, as there exists a command dubbed apropos that does exactly this for you.

Search Manual (apropos)

A very useful aspect of the Linux command line is that the documentation for almost all command line tools is easily accessible. These documents are known as man pages, and you can easily access them through the command line using the man command.

Reference Manuals (man)

Time to test your knowledge on getting help for commands

Quiz 2 - Getting Help
2 questions
+ Working With Files/Folders
7 lectures 16:41

At any given time on the command line, you are in a directory. So it speaks for itself how integral directories are to the command line. In Linux, while the rm command lets you delete directories, it's the mkdir command that allows you create them in the first place.

Preview 01:45

Sometimes, while working on the command line in Linux, you might want to create a new file. Or, there may be times when the requirement is to change the timestamps of a file. Well, there exists a utility that can you can use in both these scenarios. The tool in question is touch, and in this tutorial, we will understand its basic functionality through easy to understand examples.

Creating A File (touch)

If you are new to Linux, it's worth knowing that command line is a very powerful tool, capable of doing almost all those tasks that you can do through the graphical interface. However, more often than not, you'll find yourself doing simple tasks on the command line. One such simple task is to copy files/directories.

Copy Files/Folders (cp)

Just like cp for copying and rm for deleting, Linux also offers an in-built command for moving and renaming files. It's called mv. In this article, we will discuss the basics of this command line tool using easy to understand examples.

Move & Rename Files/Folders (mv)

Deleting files is a fundamental operation, just like copying files or renaming/moving them. In Linux, there's a dedicated command - dubbed rm - that lets you perform all deletion-related operations. In this tutorial, we will discuss the basics of this tool along with some easy to understand examples.

Preview 02:19

So we've already discussed the rm command that's primarily used for deleting files and directories from the Linux command line. However, there's another, related command line utility that is specifically aimed at removing directories. The tool in question is rmdir, and in this tutorial, we will discuss the basics of it using some easy to understand examples.

Delete Empty Folder (rmdir)

There are times when you create, say, a bash script on your Linux machine. But when you try running it, you get a permission error. What do you do? Simple, assuming you're on Ubuntu, right click on the file's icon, go to the 'Permissions' tab, and enable the 'Allow executing file as program' option.

Change File Permissions (chmod)

Time to test your knowledge on working files

Quiz 3 - Working With Files
3 questions
+ Text Files
3 lectures 08:04

If you a regular Linux command line user, I am sure you must have used the cat command. The tool is mostly used for displaying contents of a file, although it provides many other small but useful features. In this article, we will discuss the cat command in detail, explaining some of its key features.

File Concatenation (cat)

Sometimes, while working on the command line, you'll see outputs produced by commands in certain cases are so large that they don't fit into the screen area, and hence, you get to see only the last part of the output (as the initial part scrolls past the screen). Thankfully, there are utilities that are specifically designed to help you in such cases.

File Perusal Filter (more/less)

GNU nano is a text editor for Unix-like computing systems or operating environments using a command line interface. It emulates the Pico text editor, part of the Pine email client, and also provides additional functionality. Unlike Pico, nano is licensed under the GNU General Public License.

Terminal Based Text Editor (nano)

Time to test your knowledge of using text files

Quiz 4 - Text Files
2 questions
+ Users
3 lectures 07:10

Sudo (superuser do) is a utility for UNIX- and Linux-based systems that provides an efficient way to give specific users permission to use specific system commands at the root (most powerful) level of the system. Sudo also logs all commands and arguments.

Run Commands As A Superuser (sudo)

The main work of the su command is to let you switch to some other user during a login session. In other words, the tool lets you assume the identity of some other user without having to logout and then login (as that user).

Change User (su)

If you are new to system administration in Linux, you'll gradually learn that user management is an important aspect of your work. The Linux command line offers several command-line utilities for this purpose, and one of them is the id command.

Show Effecter User and Group IDs (id)

Time to test your knowledge on users

Quiz 5 - Users
2 questions
+ Killing Programs & Logging Out
3 lectures 04:38

Ctrl + C is the interrupt signal. When you type this in a terminal, bash sends SIGINT to the job in the foreground.

Kill A Running Command (ctrl + c)

We've already discussed the kill command that you can use in case you want to terminate processes in Linux. However, there exists another command line utility that you can use for the same purpose: killall. In this tutorial, we will discuss the basics of this command using some easy to understand examples.

Kill All Processes By A Name (killall)

If you are a Linux newbie, and your work involves doing stuff through the command line, then it goes without saying that you must be spending a lot of time on the terminal window. As you'd likely agree, there are some commands that we tend to use very frequently, like ls, cp, and rm. However, there are some others that are comparatively less used. In this tutorial, we will discuss one such, less frequently used command: Exit.

Preview 00:59

Time to test your knowledge for ending programs and logging out.

Quiz 6 - Killing Programs & Logging Out
2 questions
+ Shortcuts
9 lectures 21:44

Ctrl D tells the terminal that it should register a EOF on standard input, which bash interprets as a desire to exit. Ctrl + D ( ^D ) means end of file.

Tell Bash That There Is No More Input (ctrl + d)

Learn how to reduce clutter and clear the bash terminal screen.

Preview 01:36

Learn how to zoom in on the bash terminal.

Preview 01:52

Learn how to zoom out in the bash terminal.

Zoom Out (ctrl + -)

Learn about moving the cursor in the terminal for advanced navigation.

Moving The Cursor

Learn about deleting text in the bash terminal.

Deleting Text

Learn about fixing typos in the bash terminal.

Fixing Typos

Learn about cutting and pasting in the bash terminal.

Preview 02:50

Learn about capitalising characters in the bash terminal.

Character Capitalisation

Time to test your knowledge on shortcuts

Quiz 7 - Shortcuts
1 question
+ Bash
21 lectures 01:29:51

Learn about the basic structure of a bash file.

Preview 03:11

In computing, echo is a command that outputs the strings it is being passed as arguments. It is a command typically used in shell scripts and batch files to output status text to the screen or a computer file, or as a source part of a pipeline.

Preview 03:35

You should be aware of the fact that you might not be the only person reading your code. A lot of users and system administrators run scripts that were written by other people. If they want to see how you did it, comments are useful to enlighten the reader.

Comments also make your own life easier. Say that you had to read a lot of man pages in order to achieve a particular result with some command that you used in your script. You won't remember how it worked if you need to change your script after a few weeks or months, unless you have commented what you did, how you did it and/or why you did it.


A variable in bash can contain a number, a character, a string of characters. You have no need to declare a variable, just assigning a value to its reference will create it.


In computer programming, a string is traditionally a sequence of characters, either as a literal constant or as some kind of variable. The latter may allow its elements to be mutated and the length changed, or it may be fixed (after creation). A string is generally considered as a data type and is often implemented as an array data structure of bytes (or words) that stores a sequence of elements, typically characters, using some character encoding. String may also denote more general arrays or other sequence (or list) data types and structures.

Preview 06:25

In most computer programming languages, a while loop is a control flow statement that allows code to be executed repeatedly based on a given Boolean condition. The while loop can be thought of as a repeating if statement.

While Loop

In computer science, a for-loop (or simply for loop) is a control flow statement for specifying iteration, which allows code to be executed repeatedly.

Preview 03:56

Use DO UNTIL loops when a condition is not true and you want to execute the loop until the condition is true. The DO UNTIL loop tests the condition at the end of the loop and repeats only when the condition is false. Otherwise the loop executes once and ends.

Until Loop

When a break statement is encountered, it terminates the block and gets the control out of the switch or loop. When a continue statement is encountered, it gets the control to the next iteration of the loop. A break causes the innermost enclosing loop or switch to be exited immediately.

Break & Continue

User Input is one of the most important aspects of programming concepts. Every program should have some sort of user interaction, from getting a character's name for a game to asking for a password to log into a database.

Get User Input

IF Statement is one of the most popular instructions among the Decision Making statements. IF Statement gives the desired intelligence to a program, so that it can take decisions based on a criteria and most importantly decide the program flow.

If Statement

CASE Statement. The CASE statement chooses from a sequence of conditions, and executes a corresponding statement. The CASE statement evaluates a single expression and compares it against several potential values, or evaluates multiple Boolean expressions and chooses the first one that is TRUE.

Case Statements

Command line argument is a parameter supplied to the program when it is invoked.Command line argument is an important concept in programming. It is mostly used when you need to control your program from outside.

Get Arguments From The Command Line

In programming, a named section of a program that performs a specific task. In this sense, a function is a type of procedure or routine. Some programming languages make a distinction between a function, which returns a value, and a procedure, which performs some operation but does not return a value.


Global variables are declared outside any function, and they can be accessed (used) on any function in the program. Local variables are declared inside a function, and can be used only inside that function. It is possible to have local variables with the same name in different functions.

Global vs Local Variables

In computer programming, an array is a set of data elements stored under the same name. Arrays can be created to hold any type of data, and each element can be individually assigned and read. There can be arrays of numbers, characters, sentences, boolean values, and so on.


Environment variables such as $SHELL are valid systemwide. In a current Bash shell, $BASH points to the execution path of bash, whereas $SHELL points to the shell defined as default (which may be of the same value). For an explanation of environment variables see Environment Variables in Ubuntu Help.

Shell & Environment Variables

Their primary purpose is to generate build artifacts through activities like compiling and linking source code. Build-automation servers. These are general web based tools that execute build-automation utilities on a scheduled or triggered basis; a continuous integration server is a type of build-automation server.

Scheduled Automation

Aliases. A Bash alias is essentially nothing more than a keyboard shortcut, an abbreviation, a means of avoiding typing a long command sequence. If, for example, we include alias lm="ls -l. more" in the ~/.bashrc file, then each lm [1] typed at the command-line will automatically be replaced by a ls -l.


Alternatively referred to as a wild character or wildcard character, a wildcard is a symbol used to replace or represent one or more characters. The most common wildcards are the asterisk (*), which represents one or more characters and question mark (?) that represents a single character.


Using Multiple Commands. Linux allows you to enter multiple commands at one time. The only requirement is that you separate the commands with a semicolon. Running the combination of commands creates the directory and moves the file in one line.

Multiple Commands

Time to test your knowledge of Bash

Quiz 8 - Bash
4 questions
  • Passion For Learning Bash Scripting
  • Basic Computer Knowledge and Skills
  • Passion For Linux Programming
  • Basic Knowledge of Computer Science Is Optional

Learn about everything there is to know about Linux Bash Scripting. A step by step process is used to explain every facet of these topics.

NOTE: This course includes information on application programming and design!

Gain a good understanding of the following concepts with this course:

  1. What Bash scripting is?

  2. Linux Certifications

  3. How to develop using the Linux programming language

  4. Features of the Linux programming language

  5. Coding semantics

  6. Application programming

  7. Network programming

Linux is the most popular platform in the world. These platforms are developed for by all companies such as Google, Facebook and Microsoft for mobile development. This course will ensure you are not left out as more and more companies request this awesome and powerful language. This course will teach you everything about programming Linux applications.

You will receive all the knowledge to use and leverage the powerful technology behind these amazing and wonderful platforms.

Over 400,000 students have enrolled on my courses and all of them are extremely satisfied. You will also be satisfied with this course. If you do not like the course, remember that within 30 days you can request a full refundI guarantee you satisfaction.

If you have any questions regarding the topics covered in this course, please feel free to ask. I'm always happy to help those who want to learn.

To summarise this is what you get:

• Lifetime access to HD quality videos. No monthly subscription. Learn at your own pace, whenever you want.

• All videos are downloadable. Learn wherever you want, even without an internet connection!

• Downloadable starter code and final code for each section.

• Free helpful support in the course Q&A when you have questions or get stuck.

• Multiple coding challenges to practice your new skills (solutions included).

Sounds great? Then start this adventure today by clicking the “Take this course" button, and join me in the only Linux Programming course that you will need!

Who this course is for:
  • Anyone Looking To Learn About Bash Scripting
  • Developers Looking To Learn The Skills Needed To Utilise Linux Features
  • Linux Developers
  • Unix Developers
  • Mac Developers
  • Applications Programmers
  • People Looking To Learn About Programming
  • Those Seeking To Understand How Linux Programming Works
  • People Seeking Guidance On How To Create Linux and Mac Scripts
  • Beginners & Experts In This Field
  • People With a Desire To Improve Their Programming Knowledge