System Administration

Essential System Tools: Alacritty – hardware-accelerated terminal emulator

Last Updated on May 28, 2022

This is the fourth in our series of articles highlighting essential system tools. These are small utilities, useful for system administrators as well as regular users of Linux based systems. The series examines both graphical and text based open source utilities. For details of all tools in this series, please check the table in the summary section.

The first tools under the spotlight were ps_mem, a small utility that accurately reports memory consumption of software, and gtop, a system monitoring dashboard. The third tool we showcased was pet, a simple command-line snippet manager. These utilities are console-based. This time we switch to a graphical utility. It’s a terminal emulator called Alacritty. But it’s different to most terminal emulators.

Linux has lots of terminal emulators. What distinguishes Alacritty from the vast majority of terminal emulators? It differentiates itself by offering GPU-acceleration combined with a minimal feature set.

The software is written in Rust, a popular programming language among developers. For example, Rust won the most loved language in Stack Overflow’s Developer Survey for the past 3 years.

Installation

My preferred way of installing software is to compile a program’s source code. For my Arch Linux distribution, I installed a few packages first.

sudo pacman -S cmake freetype2 fontconfig pkg-config make xclip

Then it’s just a matter of cloning the software’s repository and building the software with cargo, Rust’s package manager. Cargo makes it easy to get up and running by downloading a Rust project’s dependencies, compiling the project, making packages, and more.

git clone https://github.com/jwilm/alacritty.git
cd alacritty
cargo build –release

If you’re so inclined, there’s a snap available. And many popular distributions carry a package for the software.

In operation

Let’s go through a simple test to see how Alacritty performs in practice. Alacritty boasts that it’s the fastest terminal emulator available. Defining ‘fastest’ is subjective. Are we measuring the software’s latency? Or the completion of a basic test such as the ability to scroll text in the shortest time?

For simplicity, I compared the software with other popular terminal emulators, seeing how long it takes each emulator to scroll through 100MB of text. Here are the results:

Alacritty
Click image for full size

As you can see, Alacritty completes the test in the quickest time. It’s about twice as quick as kitty, another GPU based terminal emulator. Most non-hardware accelerated terminal emulators lag behind in the test, although there are a few notable exceptions. I also tested a dozen other terminal emulator (results not shown, which were comparable with the results for Terminator and GNOME Terminal etc.), and Alacritty remains top. Different types of text manipulation tests also yielded similar results.

With the same set terminal emulators, let’s see how much memory each emulator consumes at startup in their default configuration, using the ps_mem utility.

Alacritty
Click image for full size

Alacritty consumes the most memory. The default installation sets the scrollback buffer to hold 10,000 lines. You can reduce the software’s memory consumption by lowering the number of scrollback lines. Ideally, we’d like to see dynamic memory allocation, as it can be helpful to have a large scrollback buffer in some situations while minimizing memory consumption.

Features of Alacritty include:

  • The software deliberately pares features to the bone. For example, tabs or splits are not offered. There’s no audio bell.
  • Uses a system’s dedicated GPU to improve performance.
  • Supports scrollback with definable number of lines to scrollback, together with control of the number of lines scrolled (faux scrolling).
  • Option to open URLs on click.
  • save_to_clipboard configuration option for copying selected text to the system clipboard.
  • Support for the LCD-V pixel mode (vertical screens).
  • Supports scancode-based key bindings.
  • Support for bitmap fonts.
  • Preliminary support for Wayland.
  • Cross-platform support – runs under Linux, macOS, FreeBSD, and OpenBSD. Windows support is planned.

Summary

Alacritty is a useful terminal emulator. While its features are frugal, it’s designed to be used together with other software such as tmux. It supports the Unix philosophy of composability, where components can be selected and assembled in various combinations to meet a user’s preferences.

It’s important to remember that Alacritty is in a fairly early stage of development. The developers consider the code to be alpha quality.

Website: github.com/jwilm/alacritty
Support: Wiki
Developer: Joe Wilm, Christian Duerr, and many contributors
License: Apache License 2.0

Alacritty is written in Rust. Learn Rust with our recommended free books and free tutorials.


All the essential tools in this series:

Essential System Tools
AlacrittyInnovative, hardware-accelerated terminal emulator
BleachBitSystem cleaning software. Quick and easy way to service your computer
bottomGraphical process/system monitor for the terminal
btop++Monitor usage and stats for CPU, memory, disks, network and processes
catfishVersatile file searching software
ClonezillaPartition and disk cloning software
CPU-XSystem profiler with both a GUI and text-based
CzkawkaFind duplicate files, big files, empty files, similar images, and much more
ddrescueData recovery tool, retrieving data from failing drives as safely as possible
dustMore intuitive version of du written in Rust
f3Detect and fix counterfeit flash storage
Fail2banBan hosts that cause multiple authentication errors
fdupesFind or delete duplicate files
FirejailRestrict the running environment of untrusted applications
GlancesCross-platform system monitoring tool written in Python
GPartedResize, copy, and move partitions without data
GreenWithEnvyNVIDIA graphics card utility
gtopSystem monitoring dashboard
gWakeOnLANTurn machines on through Wake On LAN
hyperfineCommand-line benchmarking tool
HyFetchSystem information tool written in Python
inxiCommand-line system information tool that's a time-saver for everyone
journalctlQuery and display messages from the journal
kmonManage Linux kernel modules with this text-based tool
KrusaderAdvanced, twin-panel (commander-style) file manager
NmapNetwork security tool that builds a "map" of the network
nmonSystems administrator, tuner, and benchmark tool
nnnPortable terminal file manager that's amazingly frugal
petSimple command-line snippet manager
PingnooGraphical representation for traceroute and ping output
ps_memAccurate reporting of software's memory consumption
SMCMulti-featured system monitor written in Python
TimeshiftReliable system restore tool
QDirStatQt-based directory statistics
QJournalctlGraphical User Interface for systemd’s journalctl
TLPMust-have tool for anyone running Linux on a notebook
UnisonConsole and graphical file synchronization software
VeraCryptStrong disk encryption software
VentoyCreate bootable USB drive for ISO, WIM, IMG, VHD(x), EFI files
WTFPersonal information dashboard for your terminal
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

3 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Albie V
Albie V
6 years ago

You mean kitty in the article. Any chance of a kitty v Alacritty comparison article?

Robert Spanjaard
Robert Spanjaard
6 years ago

Is the output speed of a terminal emulator even relevant in any way nowadays? Even when you disable jump scroll in xterm on a very slow machine (like my HP Mini 210 with an Atom N450 CPU), it’ll scroll through text much faster than anyone can read: about 110 kB/s. At the default setting with jump scroll enabled it does about 678 kB/s. I suspect that if you still have a machine that is slow enough to make terminal speed an issue, you won’t have GPU acceleration available anyway.

Greg Hollins
Greg Hollins
6 years ago

The traditional test of the speed of a terminal emulator is still relevant. It serves as a competent test harness for testing other parameters. It’s not about being able to keep up with the text.

Probably latency is more important, but that’s harder to test objectively. Most latency tests aren’t worth their salt.