As a web developer, I do backend programming as part of my daily work. Even though I do all of my development on a Mac, my code runs in production in a Linux environment. Even though I don’t plan to be a systems/devops engineer, I’ve always wanted to know more about Linux and how to manage it. I think it is good for any backend developer to gain some Linux knowledge, just to have more background on how code runs on a Linux server. I have focused on learning the Linux command line since most servers run without a GUI. Even though I’m no expert, here are some tips that have helped me along the way.
I got The Linux Command Line by William E. Shotts, Jr. on a Humble Bundle book sale and it has been my favorite book for learning Linux. The author gives away the PDF of the book for free on his website, but I recommend buying a hard copy if you have the money because it will become a handy reference. The book is very good at introducing you to the Linux philosophy as well as easing you into terminal commands and utilities used on Linux systems.
Having a good terminal text editor when learning Linux is essential. My favorite is Vim. Vim has a high learning curve, but its effective keyboard shortcuts are very performant. When working with Linux servers, you will do a lot of text editing so it helps to be comfortable with a command line editor. Other popular editors include Emacs and Nano.
Writing a handy shell script is one great way to learn more about Linux. A shell script is a code file that can be run directly by your shell (usually bash). The script is a list of commands you might type in a shell, but written down to be reused. For example, I wrote a shell script that connects to MySQL in my development environment and refreshes the database for my local setup. There are many uses for shell scripts and they are great for experimenting with Linux utilities.
Having a server to use can heavily reinforce your learning. The cheapest Linux server you can buy is a Raspberry Pi. I bought a Pi 3 and loaded Raspbian Lite on it to use as a server on my home network. I had to plug it up to a monitor at first to set up the WiFi, but now I run it headless and SSH to it to make changes. I’m still exploring different uses for the Pi, but already I’ve set up a Python server and MySQL on it for development.
I hope these tips will encourage you to learn more about Linux. It is a really great OS and is the backbone of the internet. Getting to know it better has been really fun and increased my productivity and ability to debug website issues. Plus, the uses for Linux are endless so there is always more to learn.