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.

  • A C compiler (gcc or clang)
  • `make`
  • Xlib headers (for X11) or Wayland headers (if using the Wayland fork)
  • HarfBuzz and fontconfig for proper text rendering (recommended)
  • 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.

  • `Ctrl+Shift+C` – Copy selection
  • `Ctrl+Shift+V` – Paste
  • `Ctrl+Shift+PageUp` / `PageDown` – Scroll (only if you’ve enabled scrollback)
  • `Ctrl+Shift+Enter` – Open a new terminal window (if you’ve patched it)
  • `Alt+1` through `Alt+0` – Switch between up to 10 local buffers (if you’ve enabled them)
  • 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.

  • `scrollback` – Adds `Shift+PageUp/PageDown` scrolling
  • `clipboard` – Syncs with X clipboard (already in default)
  • `alpha` – Background transparency
  • `ligatures` – Proper font ligatures (e.g., for Fira Code)
  • `bold is not bright` – Fixes bold colors
  • `dynamic cursor color` – Cursor changes color with text
  • ```bash cd st wget https://st.suckless.org/patches/scrollback/st-scrollback-0.8.5.diff patch -p1 < st-scrollback-0.8.5.diff

    Resolve any conflicts manually if needed

    make clean && make && sudo make install ```

    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`.

  • To copy a command output that includes line wraps, hold `Alt` while selecting to avoid including newlines.
  • Use `xclip` or `wl-copy` for piping selections to external tools:
  • ```bash st -e sh -c "command | xclip -selection clipboard" ```

    You can pass options at runtime: ```bash st -f "JetBrainsMono Nerd Font:size=14" # Override font st -g 120x30+100+50 # Geometry: 120 cols, 30 rows, position st -t "MyTerm" # Set window title st -e htop # Run a specific command ```

    In your window manager config (e.g., i3, dwm, bspwm), bind `Mod+Return` to `st`. Example for i3: ``` bindsym $mod+Return exec st ```

  • Ensure `fontconfig` is installed.
  • Check your font string syntax: `"Font Name:size=12"` (use `fc-list` to see available fonts).
  • If using a Nerd Font, try `"JetBrainsMono Nerd Font:size=12:antialias=true:autohint=true"`.
  • `st` reads colors only from `config.h`, not from your `.Xresources`. If you want to use Xresources, apply the `xresources` patch.

    This is intentional. Apply the `scrollback` patch, or use `tmux` (recommended). With tmux, you get unlimited scrollback, search, and copy modes.

    Some keys (like `Ctrl+Shift+Arrow`) may conflict with your window manager. Check your WM’s keybindings. You can also modify `key` definitions in `config.h` under the `keys` array.

  • Run `st` from a terminal to see error messages.
  • Common cause: missing font. Set a basic font like `"monospace"` first.
  • Check that your `config.h` has no syntax errors: run `make` and look for warnings.
  • 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.

  • Start with a pre-configured fork if you don’t want to patch. Consider `st-luke` or `st-flexipatch` which include many patches pre-applied.
  • Keep your config in version control (e.g., a git repo) so you can track changes and
  • Products Show

    Product Catalogs

    WhatsApp