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