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.
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?
- It's where code runs. Most servers, cloud machines and containers run Linux, so what works on your laptop works in production.
- Tools are one command away. Compilers, languages and databases install from your package manager, with no hunting for installers.
- The terminal is first-class. Everything you learned in Levels 2 and 3 (pipes, scripts, SSH) is everyday developer work.
- Containers run natively. Docker and Podman need no virtual machine, unlike on Windows and macOS.
- You can read the source of everything, down to the kernel.
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
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.
| Language | Quick start (distro package) | Recommended way to manage versions |
|---|---|---|
| Python | Already installed (python3) | uv (fast; manages Python versions, virtual environments and packages), or python3 -m venv |
| JavaScript / Node.js | nodejs npm | nvm, or mise |
| Rust | rustc cargo (Ubuntu), rust cargo (Fedora), rust (Arch) | rustup, the official installer |
| Go | golang (Ubuntu/Fedora), go (Arch) | Distro package, or official download from go.dev |
| Java | default-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, cmake | Distro packages |
| Several languages | mise: 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.
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
| Name | What it's like | Install |
|---|---|---|
| VS Code | The 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). |
| VSCodium | VS Code without Microsoft's tracking and branding. Uses the Open VSX extension store (most extensions are there). | vscodium.com, Flathub |
| JetBrains IDEs | Full 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 |
| Zed | A very fast, modern editor with built-in collaboration and AI features. | curl -f https://zed.dev/install.sh | sh or your package manager |
| Sublime Text | Fast and lightweight, with a loyal following. Paid licence, free to evaluate. | Official repository from sublimetext.com |
| Kate | KDE's capable editor: language server support, terminal, Git. Great on KDE. | kate |
| Geany | Small, quick IDE that works well on old computers. | geany |
| GNOME Builder | GNOME'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.
| Name | What it's like | Difficulty |
|---|---|---|
| nano | Simple, shortcuts shown on screen. Perfect for quick config edits (see Level 2). | Easy |
| micro | Like nano but modern: mouse support, Ctrl+S to save, Ctrl+C/V to copy and paste, syntax colours. | Easy |
| Vim | The classic modal editor (explained below), installed on almost every server. | Steep |
| Neovim | A modernised Vim: Lua configuration, built-in language server support, a big plugin ecosystem. | Steep |
| Helix | Modal like Vim, but with language support, fuzzy finding and Git built in. No plugins needed. | Medium |
| Emacs | An 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 |
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.
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)
| Mode | How to get there | What keys do |
|---|---|---|
| Normal | Esc (always gets you back here) | Move around and give commands |
| Insert | i (before cursor), a (after), o (new line below) | Type text, like any editor |
| Visual | v (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 / :wq | Save / quit / save and quit |
:q! | Quit without saving, the famous "how do I exit Vim?" |
| h j k l | Left / down / up / right (arrow keys work too) |
| w / b | Next / previous word |
| 0 / $ | Start / end of line |
| gg / G | Top / bottom of the file |
| dd / yy / p | Delete (cut) line / copy ("yank") line / paste |
| u / Ctrl+r | Undo / redo |
| /word, then n | Search, then jump to the next match |
:%s/old/new/g | Replace everywhere in the file (same idea as sed) |
| . | Repeat the last change |
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:
| Setup | What it's like |
|---|---|
| kickstart.nvim | A 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. |
| LazyVim | A complete, polished IDE out of the box, with sensible defaults, easy extras per language and great docs. It's what Omarchy ships. |
| NvChad | Beautiful and fast, with a strong focus on looks and themes. |
| AstroNvim | Another 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.
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).
| Tool | What it's for |
|---|---|
ripgrep (rg) | Search code fast. Respects .gitignore. |
fd | Find files fast (Ubuntu: package fd-find, command fdfind) |
fzf | Fuzzy finder for files, history, anything |
jq | Read, filter and pretty-print JSON: curl -s api.example.com | jq '.items[0]' |
lazygit | Git in a friendly terminal interface |
tmux | Split your terminal into panes, keep sessions alive over SSH |
make | Run project tasks (make test, make build) defined in a Makefile |
shellcheck | Catch mistakes in shell scripts |
direnv | Load project-specific settings automatically when you cd into a folder |
httpie / curl | Test web APIs from the terminal |
gdb | Debug 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
- ☐ Build tools and Git installed, Git configured with your name and e-mail
- ☐ An SSH key added to GitHub/GitLab/Codeberg
- ☐ One project set up with a version manager or virtual environment
- ☐ An editor chosen and set up with a language server
- ☐ Completed
:Tutorin Neovim and can save, quit and edit without the mouse - ☐ Run a database or service in a container