How To Use St: A Practical Guide To The Suckless Terminal Emulator

18 June 2026, 02:20

The st terminal emulator, developed by the Suckless project, is a lightweight, minimalist alternative to mainstream terminals like GNOME Terminal, Konsole, or iTerm2. It prioritizes simplicity, speed, and code purity over feature bloat. This guide provides step-by-step instructions, practical tips, and essential precautions for effectively using st in daily workflows.

Before diving into usage, it helps to understand what makes st unique. Unlike feature-rich terminals, st deliberately avoids built-in tabs, scrollback buffers, or graphical configuration menus. Its source code is intentionally small (under 2000 lines of C), making it highly auditable and customizable through patching rather than configuration files. This approach appeals to developers who prefer a "do one thing well" tool.

```bash sudo apt install st ``` For the latest version from source: ```bash git clone https://git.suckless.org/st cd st sudo make clean install ```

```bash brew install st ```

1. Ensure dependencies: `build-essential`, `libxft-dev`, `libfontconfig1-dev` 2. Edit `config.def.h` to adjust font, colors, or keybindings 3. Run `sudo make clean install`

Simply type `st` in any terminal or run it from your application menu. You can also launch it with a specific command: ```bash st -e vim ``` This opens st running Vim directly.

st uses minimal default keybindings. Memorize these:
  • Alt + Shift + C: Copy selected text
  • Alt + Shift + V: Paste clipboard content
  • Alt + Shift + K/L: Scroll up/down (if scrollback is enabled)
  • Ctrl + Shift + C: Interrupt current process (like Ctrl+C in other terminals)
  • Ctrl + Shift + D: Send EOF (like Ctrl+D)
  • By default, st lacks scrollback. To enable it, you must patch the source. However, you can use `tmux` or `screen` for persistent scrollback. Alternatively, pipe output to `less`: ```bash long-command | less ```

    Unlike traditional terminals, st uses a `config.h` file compiled directly into the binary. To customize:

    ```bash git clone https://git.suckless.org/st cd st ```

    Copy it to `config.h`: ```bash cp config.def.h config.h ``` Open `config.h` in a text editor. Key settings to modify:
  • Font: Change `"monospace:size=12"` to your preferred font
  • Colors: Adjust the `static const charcolorname[]` array for custom themes
  • Scrollback: Uncomment the `#define SCROLLBACK_LINES 1000` line
  • The Suckless community provides patches for features like:
  • Scrollback: `st-scrollback-0.9.diff`
  • Alpha (transparency): `st-alpha-0.9.diff`
  • Clipboard: `st-clipboard-0.9.diff`
  • Apply a patch: ```bash patch -p1 < /path/to/patch.diff ```

    ```bash sudo make clean install ```

    Since st lacks tabs and scrollback, pair it with tmux: ```bash st -e tmux ``` This gives you session persistence, split panes, and scrollback within st.

    Add this to your `config.h` for better font rendering: ```c static charfont = "Fira Code:size=11:antialias=true:autohint=true"; ``` Use `fc-list` to find available fonts.

    Popular themes like Solarized or Gruvbox can be embedded directly. For example, for Solarized Dark: ```c static const charcolorname[] = { "#073642", "#dc322f", "#859900", "#b58900", "#268bd2", "#d33682", "#2aa198", "#eee8d5", "#002b36", "#cb4b16", "#586e75", "#657b83", "#839496", "#6c71c4", "#93a1a1", "#fdf6e3", }; ```

    Add keybindings in `config.h`. For example, to make Ctrl+Q quit st: ```c { MODKEY|ControlMask, XK_q, quit, {0} }, ``` Rebuild after changes.

    If you apply the scrollback patch but can't scroll, ensure you've recompiled correctly. Also, the default keybinding for scrolling is Alt+Shift+K/L. If these conflict with your window manager, change them in `config.h`.

    st relies on Xft for font rendering. If text appears as boxes, install `ttf-dejavu` or specify a font that supports your character set. For Japanese or Chinese characters, use: ```c static charfont = "Noto Sans CJK SC:size=12"; ```

    The default copy/paste uses primary selection (middle-click). If you want clipboard integration, apply the `clipboard` patch. Alternatively, use `xclip`: ```bash st -e sh -c "command | xclip -selection clipboard" ```

    st is designed for speed, but if you experience lag, disable anti-aliasing or reduce font size. You can also compile with `-O2` optimization flags.

    Create a script that launches st with custom settings: ```bash #!/bin/bash st -f "Monospace:size=14" -g 120x40 -e tmux new-session -A -s work ``` Make it executable and bind it to a key combination in your window manager.

    For a Quake-style terminal, integrate st with your WM. In i3: ``` for_window [title="st-dropdown"] floating enable, resize set 800 600, move position center exec st -t "st-dropdown" ```

    Since st is compiled from source, updates require manual intervention. To update: ```bash cd st git pull

    Re-apply your patches

    patch -p1 < /path/to/patches/.diff sudo make clean install ``` Keep a backup of your `config.h` and patch files in a separate directory.

    st rewards users who invest time in understanding its minimalist design. While it lacks out-of-the-box conveniences, its speed, security, and customizability make it an excellent choice for power users. Start with the default installation, experiment with patches gradually, and pair it with tools like tmux to compensate for missing features. Over time, you'll have a terminal that is uniquely tailored to your workflow—and you'll understand every line of code that makes it tick.

    Products Show

    Product Catalogs

    WhatsApp