Notes for Beginners of Software Development on Linux

Posted on In Programming, Tutorial

Linux is a great platform for software development targeting servers or backends. In general, working on Linux is very productive. The problem that beginners on Linux face is the the learning curve is steep at the beginning. But believe me, after you get through the initial green steep learning step as in the figure below with some hard work, you will feel like working on a rocket in the yellow part. This post will give you some notes and pointers to information so that you can start with.

Basic knowledge of Linux

You will need to gain some basic knowledge of Linux tools, like the ls/less/cat/cd commands. ssh/scp/rsync/screen are also useful and commonly used tools. bash is very common while I know its manual is very long too. Take a read when you got some time or check the parts when you need them.

To learn these tools, take a look at the tutorials of some pretty good books or some online tutorials to get started with and check the manual pages (linked in the previous part) for more details.

Package management

Different Linux distros may have different tools to manage packages. There are several flavors of package management on Linux.

I mostly use Fedora/RHEL/CentOS/Scientific Linux and the tools to manage the packages is yum/dnf: dnf documents.

Another large community is the apt and derived tools users on Debian/Ubuntu/Linux Mint and etc. There are also zypper, pacman and etc. Check your most favorite Linux distro’s documents for how to use these tools.

You may need to possibly manually download and install some packages. Usually, the README or INSTALL files in these packages provide instructions on needed packages and steps to configure and install the package.

Documents

On Linux, the man pages for commands are very helpful. To find help on a command say ssh, just run man ssh.

You can also check the online manual pages of Linux in your browser at https://www.systutorials.com/docs/linux/man/ .

Google usually also gives good results too on tutorials of these commands.

code-test-debug

For code-test-debug loops during development, everyone may have its own best way. For me, I usually write code/build it on my local laptop/PC (network latency makes coding remotely inconvenient) and push the code to the remote server to run and test it by ssh/rsync/scp.

For standalone programs, gdb sometimes is useful. But for distributed systems, logs with the events/actions/internal states will be very helpful. I ever wrote a C fast in-memory log library named zlog.

Work environment on Linux

You will need a good editor for writing code and documents. vim and emacs are possibly the 2 most widely used ones. Time is needed to learn both of them. But they will improve your productivity once you master them at certain level. Makefile and compilers (gcc, g++) are usually needed. The Linux tools like ssh/scp/screen will be very useful.

All these seems a lot to learn. But it is not hard to start with and you need not to master all to start working.

After the initial struggling, you will start to love development on Linux. And you can then learn part by part when your work needs more.

Eric Ma

Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

2 comments

Leave a Reply

Your email address will not be published. Required fields are marked *