Thursday, July 18, 2024
HomeHow toHow to Install Alacritty (GPU Accelerated Terminal) in Ubuntu

How to Install Alacritty (GPU Accelerated Terminal) in Ubuntu

Alacritty, is a free and open-source terminal emulator, written in Rust programming language. It works in Linux, Windows, MacOS, and uses OpenGL API for GPU hardware acceleration for fast response and high performance.

The terminal emulator features vi mode, allows to move around the viewport and scrollback using the keyboard. And, vi search and normal search for anything in the scrollback buffer.

Option 1: Install Alacritty via Snap package

For Ubuntu users, the easily way to install the terminal emulator is using the Snap package. It’s available in Ubuntu Software (App Center for 23.10), though run in sandbox.

Alacritty terminal emulator in App Center

Or, user can install it by running the command below in terminal:

snap install alacritty --classic

Option 2: Install Alacritty through Cargo (official)

The terminal emulator is also available to install through Cargo, the Rust package manager.

1. Just open terminal (Ctrl+Alt+T) and run command to install Cargo first:

sudo apt install cargo

2. Then, install the required dependency packages:

sudo apt install cmake pkg-config libfreetype6-dev libfontconfig1-dev libxcb-xfixes0-dev libxkbcommon-dev python3

3. Finally, use cargo to install the terminal package:

cargo install alacritty

When done, run ~/.cargo/bin/alacritty to start the terminal.

4. The cargo package manager does not install the desktop entry for Alacritty. So, you need to manually create one by running command:

nano ~/.local/share/applications/alacritty.desktop

Then, paste following lines in the terminal window:

[Desktop Entry]
Comment=A fast, cross-platform, OpenGL terminal emulator

[Desktop Action New]
Name=New Terminal

NOTE: You need to replace ji to your username in the line above. Then, press Ctrl+S to save, and Ctrl+X to exit.

For the icon to display, run single command below to download img file and save to local icon folder:

wget -O ~/.local/share/icons/alacritty.png

Or, you can download the icon from github web page and manually copy to .local/share/icons directory.

Option 3: Ubuntu PPA

For those who prefer the Ubuntu PPA repository, keep an eye on this launchpad page for all 3rd party PPAs.

Uninstall Alacritty

Depends on how you install the terminal emulator, either remove the Snap package from Ubuntu Software or by command:

snap remove alacritty

Or, run command to uninstall the cargo package:

cargo uninstall alacritty

You may also remove Cargo itself, if there’s no other rust packages installed, as well as some dev dependency libraries to free up some disk space.

sudo apt remove --autoremove cargo cmake pkg-config libfreetype6-dev libfontconfig1-dev libxcb-xfixes0-dev libxkbcommon-dev

Also remove the desktop entry (shortcut file) by running command:

rm ~/.local/share/icons/alacritty.png ~/.local/share/applications/alacritty.desktop


Please enter your comment!
Please enter your name here

Most Popular