How To Use St: A Practical Guide To The Suckless Terminal
23 August 2026, 01:01
`st` (Simple Terminal) is a lightweight, minimal terminal emulator from the Suckless project. Unlike heavyweight terminals like GNOME Terminal or Konsole, `st` is designed to be fast, configurable through source code, and free of unnecessary features. This guide walks you through installation, configuration, compilation, daily usage, and advanced customization.
Before diving in, know that `st` is not a “plug-and-play” terminal. You modify its `config.h` (or `config.def.h`) file, recompile, and restart. Every feature—from font size to scrollback—is a deliberate choice. If you want a feature not included, you either patch it in or write it yourself. This approach keeps the binary tiny (typically under 50KB) and the performance excellent.
On Debian/Ubuntu: ```bash sudo apt install build-essential libx11-dev libxft-dev libharfbuzz-dev libfontconfig1-dev ```
On Arch: ```bash sudo pacman -S base-devel libx11 libxft harfbuzz fontconfig ```
```bash git clone https://git.suckless.org/st cd st sudo make clean install ```This installs `st` to `/usr/local/bin`. If you prefer a local install, use `make install PREFIX=~/.local`.
Run `st` from your window manager or via a keybinding. You’ll see a plain white (or black, depending on your config) window with a shell prompt.
Mouse usage: Select text with left-click drag to copy to the clipboard. Middle-click pastes (or `Ctrl+Shift+V`). Right-click extends the selection.
All configuration lives in `config.h`. Open it after cloning the repo.
```c static charfont = "monospace:size=12"; // Change to your preferred font static int borderpx = 2; // Window border width static int cols = 80; // Default columns static int rows = 24; // Default rows static charshell = "/bin/zsh"; // Your shell static charcolors[16] = { // Terminal palette "#282828", "#cc241d", "#98971a", "#d79921", "#458588", "#b16286", "#689d6a", "#a89984", "#928374", "#fb4934", "#b8bb26", "#fabd2f", "#83a598", "#d3869b", "#8ec07c", "#ebdbb2", }; ```
1. Edit `config.h`. 2. Run `make clean` (to remove old object files). 3. Run `make` (compiles with your new config). 4. Run `sudo make install` (or `make install` with your PREFIX). 5. Restart `st` (or kill all instances and relaunch).
Tip: Keep a backup of your `config.h` (e.g., `config.h.backup`) because `git pull` will overwrite it.
The true power of `st` comes from patches. Visit [st.suckless.org/patches](https://st.suckless.org/patches/) and choose what you need.
Important: Patches are written for specific versions. Check the version in `config.mk` (e.g., `VERSION = 0.8.5`) and download matching patches.
Since `st` lacks tabs and split panes, pair it with `tmux` or `screen`. This gives you sessions, persistent workspaces, and split windows without bloating `st`.If a patch doesn’t exist, you can write your own. For example, adding a “copy entire line” feature:
1. Find the `copy` function in `st.c`. 2. Add a new function: ```c void copyline(const chars) { charp = strchr(s, '\n'); if (p)p = '\0'; xclipcopy(s); } ``` 3. Bind it in `config.h`: ```c { MODKEY, XK_l, copyline, { .s = "line" } }, ```
Then recompile. This requires understanding X events and `st` internals—start small.