Intermediate Advanced

Devel-Coding: programming on Linux

Linux is the home ground of software development. This page shows how to set up your system for coding, which languages and tools to install, and which editors are available, with a closer look at Neovim.

Before you start

You should be comfortable with the terminal and your package manager (Level 2 and the package manager guide). Commands are shown for Ubuntu/Mint, Fedora and Arch where they differ.

Why code on Linux?

Setting up your system

1. Install the basic build tools

A compiler (gcc), make and friends. Many other tools quietly need them, so install them first:

$ sudo apt install build-essential git curl          # Ubuntu / Mint
$ sudo dnf group install development-tools           # Fedora
$ sudo pacman -S --needed base-devel git curl         # Arch

2. Choose an editor

See Editors & IDEs below. If you're unsure, start with VS Code and learn Neovim on the side.

3. Set up Git and SSH keys

See the next section. Together with an SSH key (Level 3 · SSH), this lets you work with GitHub, GitLab or Codeberg without typing passwords.

4. Make your terminal pleasant

A good shell setup pays off every day: Zsh and Oh My Zsh for completion and Git info in the prompt, and the small tools in Command-line dev tools.

Git essentials

Git keeps a history of every change to your code, lets you undo mistakes, and is how almost all software is shared. Tell it who you are once:

$ git config --global user.name "Anna Svensson"
$ git config --global user.email "anna@example.com"
$ git config --global init.defaultBranch main

The everyday cycle:

$ git clone git@github.com:anna/project.git     # copy a project (new one: git init)
$ git status                                   # what has changed?
$ git diff                                     # show the changes line by line
$ git add file.py                              # choose what to save (. = everything)
$ git commit -m "Fix login bug"                # save a snapshot with a message
$ git push                                     # send it to GitHub/GitLab
$ git pull                                     # fetch other people's changes
$ git log --oneline --graph                    # history at a glance
$ git switch -c new-feature                    # start a new branch
In plain words

A commit is a save point in a game: you can always go back to it. A branch is a separate save slot where you can try something risky without touching your main game.

Friendlier Git: lazygit is a terminal app that shows everything on one screen and makes staging, committing and branching a few keypresses. Most editors (VS Code, JetBrains, Neovim with plugins) also have Git built in. The Oh My Zsh git plugin adds short aliases like gst and gcmsg.

Languages & version managers

Your distro packages most languages, which is fine to start with. But projects often need a specific version, and distro versions can be old (especially on Ubuntu LTS). Version managers solve this: they install language versions in your home folder, separate from the system.

LanguageQuick start (distro package)Recommended way to manage versions
PythonAlready installed (python3)uv (fast; manages Python versions, virtual environments and packages), or python3 -m venv
JavaScript / Node.jsnodejs npmnvm, or mise
Rustrustc cargo (Ubuntu), rust cargo (Fedora), rust (Arch)rustup, the official installer
Gogolang (Ubuntu/Fedora), go (Arch)Distro package, or official download from go.dev
Javadefault-jdk (Ubuntu), java-latest-openjdk (Fedora), jdk-openjdk (Arch)Distro packages (several versions can be installed side by side), or mise
C / C++gcc, clang, gdb, make, cmakeDistro packages
Several languagesmise: one tool that manages Node, Python, Go, Java and many more, per project

Examples

# Python: a project with its own isolated environment, using uv
$ uv init myproject && cd myproject
$ uv add requests                  # installs into this project only
$ uv run main.py

# Python without uv: a virtual environment
$ python3 -m venv .venv
$ source .venv/bin/activate        # your prompt now shows (.venv)
$ pip install requests

# Rust: the official installer (from rustup.rs)
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Install uv from docs.astral.sh/uv, nvm from its GitHub page and mise from mise.jdx.dev. Each shows the current one-line install command. As always, you can download the script and read it first.

Careful: don't sudo pip

Never run sudo pip install … or sudo npm install -g …. They install behind your package manager's back and can break system tools that depend on Python. Use a virtual environment, uv, pipx (for Python command-line apps) or a version manager. Newer distros even block plain pip install outside a virtual environment, with an "externally-managed-environment" error.

Editors & IDEs

An editor is for writing code. An IDE (integrated development environment) adds a debugger, project tools and deep language support in one package. The line between them is blurry today: with plugins, editors like VS Code and Neovim can do almost everything an IDE does.

Graphical editors & IDEs

NameWhat it's likeInstall
VS CodeThe most popular editor. Huge extension library, built-in Git and terminal. Good for any language.Official .deb/.rpm and repository from code.visualstudio.com. Arch: visual-studio-code-bin (AUR).
VSCodiumVS Code without Microsoft's tracking and branding. Uses the Open VSX extension store (most extensions are there).vscodium.com, Flathub
JetBrains IDEsFull IDEs per language: IntelliJ IDEA (Java/Kotlin), PyCharm (Python), WebStorm, CLion, GoLand, Rider (.NET). Excellent refactoring and debugging. Many are free for non-commercial use.JetBrains Toolbox installs and updates them all
ZedA very fast, modern editor with built-in collaboration and AI features.curl -f https://zed.dev/install.sh | sh or your package manager
Sublime TextFast and lightweight, with a loyal following. Paid licence, free to evaluate.Official repository from sublimetext.com
KateKDE's capable editor: language server support, terminal, Git. Great on KDE.kate
GeanySmall, quick IDE that works well on old computers.geany
GNOME BuilderGNOME's IDE, best for making GNOME apps.gnome-builder, Flathub

Terminal editors

These run inside the terminal, so they also work over SSH on a server. Every serious Linux user should know at least the basics of one of them.

NameWhat it's likeDifficulty
nanoSimple, shortcuts shown on screen. Perfect for quick config edits (see Level 2).Easy
microLike nano but modern: mouse support, Ctrl+S to save, Ctrl+C/V to copy and paste, syntax colours.Easy
VimThe classic modal editor (explained below), installed on almost every server.Steep
NeovimA modernised Vim: Lua configuration, built-in language server support, a big plugin ecosystem.Steep
HelixModal like Vim, but with language support, fuzzy finding and Git built in. No plugins needed.Medium
EmacsAn editor you can turn into anything, from IDE to e-mail client (Org mode is legendary). Runs in a terminal or its own window.Steep
Language servers: smart features in any editor

Autocompletion, "go to definition", error underlining and renaming across files mostly come from a language server, a separate program that understands one language (e.g. pyright for Python, rust-analyzer for Rust, gopls for Go). The Language Server Protocol (LSP) lets any editor use any language server. That's why VS Code, Neovim, Helix, Kate and Zed can all offer similar smart features.

AI coding assistants are available too: built into VS Code (GitHub Copilot) and Zed, as JetBrains plugins, and as terminal tools such as Claude Code that work alongside any editor.

Neovim

Neovim (nvim) is a modern version of the Vim editor. It's fast, runs in any terminal (including over SSH), is configured in the Lua programming language, and with plugins becomes a full IDE. Many developers say learning it was the best investment they ever made. Be warned, though: the first week is slow.

In plain words

Most editors have one mode: every key you press types a letter. Neovim has modes. In Normal mode, keys are commands ("delete this line", "jump to the end", "copy this word"). In Insert mode, keys type text. It's like a car with gears: awkward at first, but you go much faster once you stop thinking about it.

Installing

$ sudo pacman -S neovim          # Arch: always current
$ sudo dnf install neovim        # Fedora: recent
$ sudo apt install neovim        # Ubuntu / Mint: can be quite old
$ nvim --version                 # check which version you got

Many plugins and ready-made setups need a recent Neovim. If your distro's version is old, use the official release instead, as shown in Neovim's install guide:

$ curl -LO \
    https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
$ sudo rm -rf /opt/nvim-linux-x86_64
$ sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
# then add this line to ~/.bashrc or ~/.zshrc:
export PATH="$PATH:/opt/nvim-linux-x86_64/bin"

Modes & survival keys

Start the built-in 30-minute lesson. It's the best way to learn:

$ nvim +Tutor          # or type :Tutor inside Neovim (in Vim: run vimtutor)
ModeHow to get thereWhat keys do
NormalEsc (always gets you back here)Move around and give commands
Inserti (before cursor), a (after), o (new line below)Type text, like any editor
Visualv (characters), V (whole lines)Select text, then act on it
Command:Type a command at the bottom, e.g. :w
Keys (in Normal mode)What it does
:w / :q / :wqSave / quit / save and quit
:q!Quit without saving, the famous "how do I exit Vim?"
h j k lLeft / down / up / right (arrow keys work too)
w / bNext / previous word
0 / $Start / end of line
gg / GTop / bottom of the file
dd / yy / pDelete (cut) line / copy ("yank") line / paste
u / Ctrl+rUndo / redo
/word, then nSearch, then jump to the next match
:%s/old/new/gReplace everywhere in the file (same idea as sed)
.Repeat the last change
The secret: commands are sentences

Normal-mode commands combine a verb and a target: d (delete) + w (word) = dw "delete word". c (change) + i" (inside quotes) = ci" "change the text inside these quotes". y (yank) + 3j = "copy this line and the 3 below". Learn a few verbs and targets, and you can combine them in hundreds of ways.

Your first config

Neovim reads ~/.config/nvim/init.lua at start-up. A small, useful starting point (Neovim 0.12 or newer, which has a built-in plugin manager):

-- ~/.config/nvim/init.lua
vim.g.mapleader = " "               -- Space is your personal shortcut key ("leader")
vim.opt.number = true               -- line numbers
vim.opt.relativenumber = true       -- …relative to the cursor (great for 5j, 3dd)
vim.opt.tabstop = 4                 -- a Tab looks 4 spaces wide
vim.opt.shiftwidth = 4
vim.opt.expandtab = true            -- insert spaces instead of Tab characters
vim.opt.ignorecase = true           -- search ignores case…
vim.opt.smartcase = true            -- …unless you type a capital letter
vim.opt.clipboard = "unnamedplus"   -- share the system clipboard

vim.keymap.set("n", "<leader>w", "<cmd>write<cr>", { desc = "Save file" })

-- Plugins, with the built-in plugin manager
vim.pack.add({
  "https://github.com/folke/tokyonight.nvim",       -- a colour scheme
  "https://github.com/neovim/nvim-lspconfig",       -- language server settings
})
vim.cmd.colorscheme("tokyonight")

-- Turn on the Python language server (install it first,
-- e.g. on Arch: sudo pacman -S pyright)
vim.lsp.enable("pyright")

Sharing the system clipboard needs a helper program: wl-clipboard on Wayland or xclip on X11. Run :checkhealth inside Neovim at any time. It reports what's missing or misconfigured.

Ready-made setups

Building a full IDE-like setup yourself takes time. These projects give you one instantly:

SetupWhat it's like
kickstart.nvimA single, heavily commented config file. Not a "distribution" but a starting point to learn from: read it, understand it, make it yours. Recommended if you want to really learn Neovim.
LazyVimA complete, polished IDE out of the box, with sensible defaults, easy extras per language and great docs. It's what Omarchy ships.
NvChadBeautiful and fast, with a strong focus on looks and themes.
AstroNvimAnother full-featured setup with a community plugin collection.

They need git, a C compiler (build tools), ripgrep, fd and a Nerd Font. Most use Mason, a plugin that installs language servers for you.

Try it: test a setup without touching your own config

Neovim can keep several configs side by side with the NVIM_APPNAME variable:

$ git clone https://github.com/LazyVim/starter ~/.config/lazyvim
$ NVIM_APPNAME=lazyvim nvim                     # first start installs the plugins

$ git clone https://github.com/nvim-lua/kickstart.nvim ~/.config/kickstart
$ NVIM_APPNAME=kickstart nvim

Your normal nvim stays exactly as it was. Delete the folder in ~/.config to remove a test setup.

Command-line dev tools

Small tools that developers use every day. All are in your package manager (see also Tips · Small tools).

ToolWhat it's for
ripgrep (rg)Search code fast. Respects .gitignore.
fdFind files fast (Ubuntu: package fd-find, command fdfind)
fzfFuzzy finder for files, history, anything
jqRead, filter and pretty-print JSON: curl -s api.example.com | jq '.items[0]'
lazygitGit in a friendly terminal interface
tmuxSplit your terminal into panes, keep sessions alive over SSH
makeRun project tasks (make test, make build) defined in a Makefile
shellcheckCatch mistakes in shell scripts
direnvLoad project-specific settings automatically when you cd into a folder
httpie / curlTest web APIs from the terminal
gdbDebug C, C++, Rust and Go programs step by step

Containers

A container packs an app with everything it needs, such as a database or a specific Python version, into an isolated box. You can start one in seconds and throw it away without leaving a trace on your system. That makes them perfect for trying a database or matching a project's exact setup.

$ sudo apt install podman            # Ubuntu (Fedora: dnf, Arch: pacman)
$ podman run --rm -it docker.io/library/ubuntu bash   # throw-away Ubuntu shell
$ podman run -d --name db -e POSTGRES_PASSWORD=secret \
    -p 5432:5432 docker.io/library/postgres     # a PostgreSQL database
$ podman ps                           # running containers
$ podman stop db && podman rm db

Podman and Docker use the same commands and images, so docker works the same way if you install Docker instead. Podman runs without root by default. With Docker, add yourself to the docker group (sudo usermod -aG docker $USER, then log out and in). Be aware that this group is effectively equal to root access. Distrobox goes one step further: it gives you a full other distro (say, Ubuntu on Arch) inside a container, integrated with your desktop.

Checklist