Resources for learning bash/shell scripting in GNU/Linux
There is a stigma around the word Linux, where people generally envision people with glasses, beards, and look like a hippy programmer. Funny enough, this perfectly describes Richard Stallman, the creator of GNU, the actual operating system that we simply refer to as â€˜Linuxâ€™ nowadays (much to his distaste.)
However, part of this stigma, is also that GNU/Linux users are constantly glued to terminals, hacking away code constantly to run their operating system. This once upon a time wasnâ€™t too far off, but nowadays most users may never even see the terminal.
However, those who do wish to dive in deeper, and really see the true power behind using a CLI, may wish to learn shell programming / scripting. The applications of doing so, are virtually boundless; from automating to maintenance.
However, self-teaching scripting can be tedious and sometimes confusing, if you donâ€™t know where to begin, or have some kind guidance. Thereâ€™s quite a number of resources for learning various languages, but my personal favourite for Shell, is https://www.learnshell.org/
Like other sites such as https://codeacademy.com, Learnshell uses an interactive teaching method where users are taught a lesson and forced to utilize what they learn to complete objectives.
Learnshell also has a number of other languages available, such as:
- HTML & CSS
However, I can only attest to having used the website for shell scripting personally, I can say that I am interested in checking out the C tutorials as well.
The Shell programming section of the site sorts tutorials in basic and advanced groups. You learn about variables, basic operators and decision making in the basic section, and about advanced concepts such as regular expressions, process substitution or input parameter parsing.
Another great resource for learning to script, focusing specifically on bash scripting, is http://www.bash.academy/
While not using the same live interactivity as a couple of sites previously mentioned, the bash academy is far more in-depth with explanations and lessons taught. Some could view this as information overload, others may love to learn all of the intricate details. Regardless, it is definitely a place worth checking out if youâ€™re interesting learning the most common and native scripting (arguably) for your GNU/Linux system.
With that said, for those of you about to take the plunge and start heading deeper into the magic of the command line, its a bit of a learning curve if you donâ€™t have a background in programming, but it is definitely worth the effort! Good luck!Advertisement