In this note, I have put together a small roadmap for those who want to learn programming in the Bash shell language.
🖐️Hey!
Subscribe to our Telegram channel @r4ven_me📱, so you don’t miss new posts on the website 😉. If you have questions or just want to chat about the topic, feel free to join the Raven chat at @r4ven_me_chat🧐.
This map is based on my experience learning to write Bash scripts. Do not be afraid of its size: if you study at least a quarter of the material listed here, you will already be able to solve many tasks related to Linux automation by writing Bash scripts.
Step 0. About Working in the Command Line
An important step! If you do not feel confident when working in the Linux command line, do not rush to write scripts. First, it is worth learning to understand and use the main shell commands and mechanisms in practice☝️.
My blog has a separate series of articles on the Linux command line, intended for beginners (and not only). After studying this series, you will be able to confidently perform most typical tasks encountered in the Linux terminal👨💻.
Below are links to articles from this series:
Linux Command Line
- Command types, plain text, file system, shell prompt
- Navigation in the system and viewing directories: pwd, ls, cd commands
- Output and reading contents: echo, cat, less commands
- Working with files: touch, mkdir, cp, mv, rm commands
- File links: ln command
- Input and output redirection: “>”, “<”, “|” operators
- Command execution control: “&&”, “||”, “;” and “&” operators
- Processes: jobs, fg, bg, ps, pgrep, kill, pkill, htop commands
- File permissions: id, chmod, chown commands
- Privilege escalation: su, sudo commands
- Archiving and compression: tar, gzip, bzip2, xz, zstd and zip, 7z, rar commands
Step 1. A Series of Articles on Habr (Part One)
Today many advanced Linux users begin their journey in automating destruction of the system precisely with the Habr articles listed below👇.
I intentionally split them into two parts, because the articles from the second part imply more advanced use of specific utilities🤷♂️.
The very beginning of script writing:
List of articles from the first part
Step 2. The Book “The Linux Command Line”
This step can serve as an alternative to the previous one - only in book format and sometimes more in-depth, while still understandable👽.
Book: “The Linux Command Line”, author - William Shotts. More specifically, its 4th part: Shell Scripting.
I would recommend reading the whole book - in places, it will surprise even a very experienced user. But if the goal is to learn how to write shell scripts correctly, then…
Contents of the 4th part of the book
- Writing your first shell script
- Starting a project
- Top-down design
- Flow control: branching with if
- Reading keyboard input
- Flow control: while and until loops
- Troubleshooting
- Flow control: branching with case
- Positional parameters
- Flow control: for loop
- Strings and numbers
- Arrays
- Exotica
You can buy the book or easily find it somewhere else. Well, you get the idea 😉.
Step 3. A Series of Articles on Habr (Part Two)
If you have reached this stage, it means you already know something and are ready to make your brain boil🔥.
The articles from this step are not mandatory to study, but are highly recommended☝️. sed, awk, and regexes will often appear before your eyes if you actively study Linux systems🐧.
There is also an article here with selections of practical examples and a demonstration of the expect command’s capabilities:
List of articles from the second part
Step 4. Required Reading
After everything covered, it is very important to learn the subtleties of Bash programming. The shell is a specific tool, and there are many nuances in how it works. Therefore, in my opinion, the two articles below are required reading📑.
The first demonstrates a minimal safe Bash script template, and the second talks about the specifics of scripts written in this shell language.
2 important articles
Step 5. My Materials
If after all this you still have an interest in Bash scripting, you can study thematic materials from my blog:
Articles about script writing
- A little about shebang in Linux
- Configuring logging for command/script output
- flock - locks in shell scripts
- Bash: Features of arithmetic operations - increment ((expression++))
- Bash: An example of optimizing filtering commands with grep and awk
- Writing a bash script for connecting to an OpenConnect VPN server
- Bash: Writing a universal script for checking host availability
Or study scripts used in some articles:
Scripts as part of an article
- Article: SSH - Fine-Tuning the Client in Linux: config file and ssh-agent
- Article: Building a Docker image of the Unbound DNS server
- Article: Setting up a Zabbix 7 + TimescaleDB monitoring server in docker
- Article: Making functional notifications on the Linux desktop: buttons, icons, links
- Article: Setting up an OpenConnect SSL VPN server (ocserv) in docker for internal projects
Bash scripts are the foundation of Linux automation. This skill is required in many DevOps/admin vacancies in the IT market👨💻. Yes, there are many other tools that can solve the same tasks, for example Python, Lua, Perl, PHP, JavaScript, Go, C, Rust, and so on. But the truth is always somewhere in the middle. As they say, each task has its own tools😌.
Study Bash. I wish you good luck in script writing!

👨💻Ну и…
Don’t forget about our Telegram channel 📱 and chat 💬 All the best ✌️
That should be it. If not, check the logs 🙂


