How to Install Alacritty (GPU Accelerated Terminal) in Ubuntu

Last updated: December 30, 2023 — Leave a comment

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]
Type=Application
Exec=/home/ji/.cargo/bin/alacritty
Icon=alacritty
Terminal=false
Categories=System;TerminalEmulator;
Name=Alacritty
Comment=A fast, cross-platform, OpenGL terminal emulator
StartupNotify=true
StartupWMClass=Alacritty
Actions=New;

[Desktop Action New]
Name=New Terminal
Exec=/home/ji/.cargo/bin/alacrittyalacritty

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 https://raw.githubusercontent.com/alacritty/alacritty/master/extra/logo/compat/alacritty-term.png -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

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via ubuntuhandbook1@gmail.com Buy me a coffee: https://ko-fi.com/ubuntuhandbook1 |

No Comments

Be the first to start the conversation.

Leave a Reply

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

*