Learn the steps and commands to install Alacritty terminal on Ubuntu 22.04 jammy jellyfish Linux using the PPA repo or by compiling it from source code.
Alacritty terminal is known for its fast speed. It’s written in Rust and uses OpenGL for rendering to be the fastest terminal emulator available. It is the simplest terminal emulator for Linux because the developers want to increase its performance of it. That means you won’t find things like tabs, splits, or GUI config editor. Therefore, this terminal is for those who are Linux using some old system or have limited resources, or looking for a performance-centric Terminal.
It is not for those who want some fancy Terminal with dozens of features such as Tabby and Terminator instead a simple, minimal one that can use the GPU to enhance the performance. Well, it is a relatively new Terminal as compared to other popular names such as Gnome terminal or XFCE terminal.
Here in this tutorial article, where we know how to install and use Alacritty on Ubuntu 22.04 Linux…
Steps to install Alacritty on Ubuntu 22.04 Linux
There are two ways to install Alacritty on Ubuntu one is using the PPA repository and the other is by compiling its source code available on GitHub.
#1st Method using PPA repo
1. Update Ubuntu 22.04
Open your default terminal, you can use the keyboard shortcut Ctrl+Alt+T. After that before moving further and adding PPA, run the system update using the given command.
sudo apt update && sudo apt upgrade
2. Add Alacritty PPA repository
Well, those who don’t want to add some third-party PPA repository on their Ubuntu 22.04 can go for the second method given in this tutorial i.e using source code. However, users looking for a simple way can use the PPA.
sudo add-apt-repository ppa:aslatter/ppa -y
3. Install Alacritty Terminal on Ubuntu 22.04
Once you have added the PPA repository, we can install the Alacritty terminal on Ubuntu 22.04 using the APT package manager of the system like any other common open-source software.
sudo apt install alacritty
#2nd Method- By Compiling the Alacritty source code.
4. Install Developer Tools
There may be some users who don’t want to add any extra PPA repo on their Ubuntu system although it is safe, now. Yet, if an additional repository is something you don’t want then compile the source. For that, first install the developer tools in your Ubuntu 22.04. Here is the command for that.
sudo apt install cmake pkg-config libfreetype6-dev libfontconfig1-dev libxcb-xfixes0-dev libxkbcommon-dev python3 -y
5. Configure Rust on Ubuntu 22.04
As Alacritty is written in Rust programming language, hence our system also needs Rust to run this terminal emulator application. To install it, just run the given command.
sudo curl https://sh.rustup.rs -sSf | sh
Note: Once the installation is completed, close your Terminal and open it again, so that it can be loaded into the system and recognize the Rust command line tool.
6. Download Alacritty Source code
Now, we need to copy the source from the GitHub repository of Alacritty, for that we can use the Git command line tool.
sudo apt install git -y
Clone Source code:
git clone https://github.com/jwilm/alacritty.git
7. Start Compiling process
After cloning source code, switch to its directory, here is the command to do that:
Now use cargo to build:
cargo build --release
To confirm, the Alacritty terminal is installed without any error, run:
sudo tic -xe alacritty,alacritty-direct extra/alacritty.info
If the output is without any error that means, everything is alright and working fine.
8. Create a Desktop shortcut
Once the installation process of building Alacritty source code is done, it will save the compiled binary under a directory, here is the path to that:
/target/release/alacritty present under your Alacritty’s git cloned directory.
Without leaving Alacritty directory, run the given commands.
sudo cp target/release/alacritty /usr/local/bin
sudo cp extra/logo/alacritty-term.svg /usr/share/pixmaps/Alacritty.svg
sudo desktop-file-install extra/linux/Alacritty.desktop
To get automatic completions for Alacritty’s flags and arguments you can install the provided shell completions.
echo "source $(pwd)/extra/completions/alacritty.bash" >> ~/.bashrc
9. Run Alacritty Terminal
After following any of the above two methods, you will have the Alacritty Terminal on your Ubuntu 22.04 installed. Now, to run it, click on the Activities link given in the Ubuntu Taskbar and search for the Terminal. Soon you will see the icon of it, click the same to launch.
10. For Customization
To customize the look and feel of the Terminal, we can create Alacritty YML Configuration. You can get the default one here on Github.
or for the current one while doing the article use the given commands:
Now you have the file. Edit the same to configure the Terminal as per your choice.
To save the file, use: Ctrl+O, hit the Enter key, and then exit: Ctrl+X.
11. Pre-built Terminal Themes
You can also, use the pre-built themes. For that you can use the NPM:
sudo apt install npm
sudo npm i -g alacritty-themes
A list of themes will appear, use the navigation and select the one you want to apply:
12. How to update Alacritty
If you have used the PPA package manager then simply run the system command to update the Alacritty Terminal to its latest version.
sudo apt update && sudo apt upgrade
Those who have followed the Source code compilation, need to run the above-given steps (of the second method) to compile the latest available source code.
13. Uninstall Alacritty from Ubuntu 22.04
Well, if you didn’t like this Terminal application then to remove Alacritty completely from your Ubuntu 22.04 system by following the given commands:
For PPA users:
sudo apt autoremove --purge alacritty
For source compiled users:
sudo rm /usr/local/bin/alacritty
sudo rm /usr/share/pixmaps/Alacritty.svg
sudo rm /usr/share/applications/Alacritty.desktop
Also, delete the source code directory which you have cloned from GitHub.
⇒ Install the Terminator Terminal emulator in Ubuntu 22.04 LTS
⇒ How to install Tilda Terminal on Ubuntu 22.04 LTS
⇒ Install Tabby Terminal on Ubuntu 22.04 Linux
⇒ How to install the Guake Terminal app on Ubuntu 22.04 LTS Linux
⇒ How to install the Hyper Terminal app on Ubuntu 22.04 LTS