How To Use St: A Comprehensive Guide To The Simple Terminal

12 July 2026, 02:57

The Simple Terminal, commonly known as `st`, is a lightweight, fast, and highly customizable terminal emulator developed by the suckless community. Designed with minimalism in mind, `st` focuses on efficiency and simplicity, making it an excellent choice for users who prefer a no-frills terminal experience. This guide will walk you through the installation, configuration, and advanced usage of `st`, ensuring you can harness its full potential.

`st` is part of the suckless software suite, which emphasizes code simplicity, clarity, and resource efficiency. Unlike many modern terminal emulators, `st` does not rely on heavy libraries or complex configuration files. Instead, it uses a simple C source code that you can modify directly to suit your needs. This approach gives you complete control over features, but it also means you need to recompile the program after making changes.

Before installing `st`, ensure your system has the necessary dependencies. On most Linux distributions, you will need a C compiler (like GCC), make, and the Xlib development libraries. For Debian-based systems, install them with:

```bash sudo apt install build-essential libx11-dev libxft-dev ```

On Arch Linux, use:

```bash sudo pacman -S base-devel libx11 libxft ```

1. Download the source code from the official suckless repository or clone it via Git: ```bash git clone https://git.suckless.org/st cd st ```

2. Review the configuration file (`config.def.h`) to understand the default settings. This file contains key bindings, colors, fonts, and other parameters.

3. Compile and install: ```bash sudo make clean install ```

This command compiles the source and copies the binary to `/usr/local/bin`. You can now launch `st` from your terminal by typing `st`.

The primary configuration method for `st` is editing the `config.h` file. Since `st` does not use external configuration files, you must modify the source code and recompile. Here’s how to proceed:

First, copy the default configuration file to create your custom version:

```bash cp config.def.h config.h ```

Open `config.h` in your preferred text editor. Key sections to customize include:

  • Font: Change the `font` variable to your desired monospace font. For example:
  • ```c static charfont = "Fira Code:size=12"; ```
  • Colors: Modify the `colorname` array to set your terminal colors. Use hex values like `"#282828"` for background and `"#ebdbb2"` for foreground.
  • Key bindings: Adjust shortcuts for copy, paste, zoom, and other actions. For instance, to change the copy shortcut from `Alt-c` to `Ctrl-Shift-c`, modify the corresponding line.
  • Scrollback: Enable or disable scrollback by setting `scrollback` to a positive integer (e.g., `1000` for 1000 lines).
  • After editing `config.h`, recompile and reinstall:

    ```bash sudo make clean install ```

    Launch `st` again to see your changes. If something breaks, revert to the original `config.def.h` and test incrementally.

    Once `st` is running, you can use it like any other terminal emulator. Here are some built-in shortcuts:

  • Copy text: Select text with the mouse, then press `Alt-c` (or your configured key).
  • Paste text: Press `Alt-v` (or your configured key).
  • Increase font size: `Alt-Shift-k` (or `Alt-plus`).
  • Decrease font size: `Alt-Shift-j` (or `Alt-minus`).
  • Reset font size: `Alt-Shift-h` (or `Alt-0`).
  • To open a new `st` window, simply type `st &` from your shell.

    The suckless community provides many patches to extend `st`'s functionality. Common patches include:

  • Scrollback: Adds mouse wheel scrolling and keyboard navigation through history.
  • Clipboard: Integrates with system clipboard for better copy/paste.
  • Alpha: Adds transparency support via compositors like picom.
  • Ligatures: Enables font ligatures for better readability.
  • To apply a patch, download the `.diff` file and run:

    ```bash patch -p1 < patchfile.diff ```

    Then recompile. Always backup your `config.h` before patching.

    Modify the `shortcuts` array in `config.h` to match your workflow. For example, to bind `Ctrl-Shift-c` for copying and `Ctrl-Shift-v` for pasting:

    ```c { MODKEY|ControlMask, XK_c, clipcopy, {.i = 0} }, { MODKEY|ControlMask, XK_v, clippaste, {.i = 0} }, ```

    Replace `MODKEY` with `AltMask` or `ShiftMask` as needed.

    `st` does not natively support tabs, but you can use terminal multiplexers like `tmux` or `screen` inside it. For a lightweight alternative, consider using `dvtm` or simply spawning multiple `st` windows.

  • Font rendering problems: Ensure you have a valid monospace font installed. Check with `fc-list | grep -i monospace`.
  • Copy/paste not working: Verify your X selection settings. Some desktop environments interfere with clipboard handling.
  • Slow performance: `st` is typically very fast. If you experience lag, check for heavy compositing or conflicting patches.
  • Here’s a typical workflow for a developer using `st`:

    1. Launch st with a specific geometry: `st -g 120x40 -e zsh`. 2. Use tmux inside `st` for session management. 3. Apply the alpha patch for a semi-transparent background, allowing you to see windows behind the terminal. 4. Bind Ctrl-Shift-arrows to switch between tmux panes seamlessly. 5. Set a custom color scheme that reduces eye strain during long coding sessions.

  • Start with default settings and only add patches that you genuinely need. Every modification increases complexity.
  • Keep a backup of your working `config.h` and patches in a Git repository.
  • Test patches one at a time to isolate conflicts.
  • Read the official documentation and the `st` man page (`man st`) for deeper insights.
  • By following this guide, you can transform `st` into a powerful, personalized terminal that aligns perfectly with your workflow. Its minimal footprint and high performance make it an ideal choice for users who value efficiency and control.

    Products Show

    Product Catalogs

    WhatsApp