Skip to main content
pelatihan
.org
Learn. Practice. Grow.
Category
EN
Sign in
Sign up
Menu
Bash Curriculum: 8 Chapters, 53 Lessons — pelatihan.org
Home
/
Catalog
/
Bash
/
Curriculum
Curriculum
Bash Curriculum
Learn Bash online with 53 structured lessons, code examples, and 265 quiz questions.
53 lessons
8 chapters
265 questions
Summaries and key points are free to preview. Full lessons, code examples, and quizzes require a subscription.
01
Bash Tutorial
3 lessons
01
Bash HOME
Bash (Bourne Again SHell) is a shell and command-line scripting language that is standard in most Linux and macOS systems. Through Bash you run programs, manage files, and…
02
Bash Intro
Bash acts as an intermediary between you and the system: it displays the prompt, reads a command line, and then executes it. The command can be an external program in the PATH or…
03
Bash Get Started
To get started, open the terminal app and then type the command and press Enter. Bash is generally installed on Linux and macOS, while on Windows it is available via WSL or Git…
02
Basic Commands
13 lessons
01
Bash Commands
Bash commands are usually written as the program name followed by arguments and options, separated by spaces. Options are generally initiated with one or two minus signs, and…
02
Bash List (ls)
The ls command displays a list of files and directories in a folder. Option -a displays a hidden file that is preceded by a dot, while -l provides a long format containing…
03
Bash Change Dir (cd)
The cd command is used to move the work directory inside the shell. You can use the absolute path that is initiated, the relative path, or the abbreviation like ~ for home and..…
04
Bash Print Dir (pwd)
The pwd command displays the current work directory location in absolute path form. It's very helpful after moving folders with a CD or when writing scripts that work in multiple…
05
Bash Echo (echo)
The echo command displays text or variable values to the screen. It is often used to print simple messages, enter text into files, and check the contents of variables. In Bash,…
06
Bash Concatenate (cat)
The paint command displays the contents of the file to the screen and can combine several files into one. It is also often used to create new files from keyboard inputs using the…
07
Bash Copy (cp)
The cp command copies a file or directory from source to destination. To copy the folder you need the -r option to copy the entire contents. The -i option is useful for Bash to…
08
Bash Move (mv)
The mv command moves files or directories and is used to change names. Because the file was moved, the original location automatically becomes empty after the command is…
09
Bash Remove (rm)
The rm command permanently deletes files and directories, without going through the trash. For the folder, the -r option is required, and -f is used to force unconfirmed…
10
Bash Timestamp (touch)
The touch command creates new empty files if the files do not exist, or updates the modification time if the files do exist. It is often used to prepare temporary files when…
11
Bash Make Dir (mkdir)
The MKdir command creates a new directory at the location you specify. Without the option, the parent folder should already be available, whereas -p creates an entire chain of…
12
Bash Manual (man)
The man command displays a page manual of a program, containing how to use it, options, and examples. When you open the manual, you search with/followed by the keyword and exit…
13
Bash Alias
Alias is a short name that replaces long or frequently used commands. The alias definition is written with the = without space and is usually stored in ~/.bashrc to keep it…
03
Text Processing
7 lessons
01
Bash Search Text (grep)
The grep command searches for lines containing specific patterns in the file or from the input pipe. It supports important options such as -i to ignore capital letters, -n to…
02
Bash Pattern Scan (awk)
The awk command processes line-by-line text based on the spaced columns inherently. You name the column with $1, $2, etc., and add the BEGIN/END conditions and blocks for the…
03
Bash Stream Editor (sed)
The sed command modifies the flow of text line by line, generally to search for and replace text. Substitution orders are in the form of old text and can be limited to a certain…
04
Bash Remove Section (cut)
The cut command takes a portion of each line of text based on a column or character. With -d you set the column separator and -f you choose the column that you take. Cut works…
05
Bash Sort Lines (sort)
The sort commands sort the lines of text, in a sequence of letters. The -n option is required to order numbers numerically, -r reverses the result, and -u removes the twin row.…
06
Bash View End (tail)
The tail command displays the end of the file, usually the last few lines. The -n option specifies the number of rows, while the -f makes it possible to keep track of the data…
07
Bash View Start (head)
The head command displays the beginning of the file, default as the first 10 rows. The -n option sets the number of rows and the -c set the number of bytes. It's useful to check…
04
System Monitoring
7 lessons
01
Bash Process Status (ps)
The ps command displays a list of processes running along with PID and status. With the aux or -ef option you see the entire process in the system, whereas the argumentless ps…
02
Bash List Processes (top)
The top command displays a list of processes that are periodically updated, sorted by CPU usage. You can interact directly inside, like pressing k to send a signal or q to exit.…
03
Bash Disk Space (df)
The df command displays the capacity and remaining space on each installed file system. The -h option converts the byte into a readable unit like M and G. This information is…
04
Bash Directory Usage (du)
The du command calculates the disk space usage per file and per directory. With -s you get a total of one folder, whereas -h makes the numbers easy to read. It's very helpful to…
05
Bash Memory Usage (free)
The free command displays information on RAM usage and swap on Linux systems. You can see total, used, available, and the rest of the buffer and cache. The -h option makes the…
06
Bash Terminate (kill)
The kill command sends a signal to the process based on its PID, usually to stop the program. The built-in signal is the TERM that allows the process to clear itself, whereas…
07
Bash Uptime
The uptime command displays how long the system has been running since it was last activated, the number of user logins, and the average load. The three load averages represent…
05
Networking
6 lessons
01
Bash Ping
The ping command tests the network connection by sending an ICMP package to the destination host and waiting for a response. The results show response times and missing packets,…
02
Bash URL Transfer (curl)
The curl command sends and receives data from URLs through various protocols, especially HTTP. It can download files with -o, display header with -I, and send JSON data to the…
03
Bash Downloader (wget)
The wget command downloads files from the internet and stores them to a computer. It supports partial continuous downloads with -c, recursive downloads with -r, and file naming…
04
Bash Remote Connect (ssh)
The ssh command opens the terminal session to another computer securely over the network. Once connected, you can run commands on the remote as if you were in front of it.…
05
Bash Secure Copy (scp)
The scp command copies files between the local computer and the remote server via an SSH connection so that the data is encrypted. The method of use is similar to cp, only the…
06
Bash File Sync (rsync)
The rsync command copies and syncs files and folders efficiently, only transferring the changed parts. It's popular for backup, with the -a option for archive mode and -delete so…
06
File Compression
3 lessons
01
Bash Compress (zip)
The zip command creates a compressed archive that combines multiple files into one file. The -r option is used to include all the contents of the folder, and the original file…
02
Bash Extract (unzip)
The unzip command extracts the contents of the .zip file to the destination folder. You can display the list of contents first with -l, then select the destination folder through…
03
Bash TAR Archive
The tar command creates and extracts archives, often combined with gzip to reduce the size. On the tar option, c to create, x to extract, z to gzip, v to verbose, and f to…
07
File Permissions
4 lessons
01
Bash Ownership
Each file and folder in Linux has read (r), write (w), and execute (x) permissions for three parties: owner, group, and others. The ls -l command shows a string of permissions…
02
Bash Modify (chmod)
The chmod command changes the access permissions of a file or directory, either with a number (octave notation) or a symbol (u, g, o, a). The quickest way to add execution…
03
Bash Ownership (chown)
The chown command changes the file owner to another user, and can simultaneously replace the group with the user:group format. These changes can generally only be made by root,…
04
Bash Group (chgrp)
The chgrp command changes the file owner group without touching the user owner. It's useful when multiple team members need to access the same file through a shared group. Make…
08
Scripting
10 lessons
01
Bash Syntax
The Bash syntax has a simple rule: one command per line, end with Enter, and the # is used for comments. You can combine the command with;, &&, or ▽, and then break the long line…
02
Bash Script
A Bash script is a text file that contains a sequence of commands running in sequence. The script is usually started with the #!/bin/bash, given execution permission, and then…
03
Bash Variables
The Bash variable stores reusable text with the $ sign. The writing should be NAME=value with no spaces around the equals sign, and then read $NAME or ${NAME}. The variable is…
04
Bash Data Types
Bash is a language without strict data types, all values are basically stored as strings including numbers. Arithmetic operations are performed within the arithmetic expression…
05
Bash Operators
Bash operators include arithmetic operators, comparisons within the test, and logic operators. Note that the numerical comparison uses -eq, -lt, etc., whereas the string uses =…
06
Bash If...Else
The if branch checks a condition and then executes the command block accordingly. The structure begins with if, continues then, optional else or elliptic, and closes with fi.…
07
Bash Loops
The Bash repeat runs the command block many times: for for list or range, while during the correct condition, and until the condition becomes correct. break stops the repeat,…
08
Bash Functions
The Bash function groups commands so they can be used repeatedly with the same name. You define it with a curly braces block, then call it a regular command. The function…
09
Bash Arrays
Bash arrays store many values in one variable, created with parentheses containing a list of values separated by spaces. Elements are accessed via an index starting from 0,…
10
Bash Schedule (cron)
Cron is a task scheduler in Linux that automatically executes commands at a given time. You manage the schedule using crontab commands, like crontab -e to edit and -l to view the…