Programming on Unix: C, C++, Perl, Python, shell and more

Updated November 2026

Unix was written by programmers for programmers, and it is still the most comfortable place to write code. This page shows which language suits which job, how to install the tools and where to learn each one for free.

Which language for which job

JobGood choices
Automating commands, small admin tasksShell
Larger admin scripts, text and data processingPython, Perl
Websites and web applicationsPHP, Python, JavaScript (Node.js), Go
System programs, drivers, fast librariesC, C++, Rust
Network services and command-line toolsGo, Rust
Large business applicationsJava, C#
Working with databasesSQL from any of the above

Install the development tools

# Debian and Ubuntu: compilers, make and headers in one go
sudo apt install build-essential gdb git python3 python3-venv

# RHEL, AlmaLinux, Rocky, Fedora
sudo dnf group install "Development Tools"
sudo dnf install python3 git

# FreeBSD: clang is part of the base system
sudo pkg install gmake gdb git python3

C and C++

Unix itself is written in C, and the C compilers (GCC and Clang) are part of every distribution. A first program:

cat > hello.c <<'EOF'
#include <stdio.h>

int main(void) {
    printf("Hello from C\n");
    return 0;
}
EOF
gcc -Wall -Wextra -O2 -o hello hello.c
./hello

Always compile with warnings on (-Wall -Wextra), and while developing add -g -fsanitize=address,undefined to catch memory errors. Larger projects use make or CMake to build. Free resources:

Python

Python is installed on almost every Linux system and has become the default language for administration scripts, automation (Ansible is written in it) and data work. Use a virtual environment for each project instead of installing packages system-wide:

python3 -m venv ~/venvs/tools
. ~/venvs/tools/bin/activate
pip install requests

Learn it from the official Python tutorial or the free book Automate the Boring Stuff with Python.

Perl

Perl was the Unix administrator's language of choice for decades and is still installed everywhere, so a Perl one-liner often works where nothing else is available. See Perl basics.

Go and Rust

Both compile to a single fast program with no runtime to install, which makes them popular for command-line tools and network services. Many newer Unix tools are written in them: ripgrep, fd and bat in Rust; Docker, Kubernetes and Hugo in Go.

Version control

Whatever language you use, keep your code (and your configuration files) in Git:

git init
git add .
git commit -m "first version"

Pro Git is the free, complete guide.

Web programming

For how programs talk to web servers, start with CGI, the original mechanism, then PHP and setting up a LAMP server.