Alacritty is an open source, OpenGL terminal emulator that is written primarily in Rust. Apart from being fast, Alacritty is also cross-platform which means we can install it on a number of platforms including Ubuntu.
Note I have so far tried installing it successfully on Ubuntu 20.04 and 21.10 hence why I've specified the Ubuntu version but this installation should also work for some earlier versions of Ubuntu as well.
⭐ Installing Alacritty
Now you can install Alacritty using two main methods. You can either build Alacritty from source or use your package manager. For now, we're going going to go with the simpler option of installing Alacritty using our package manager. Perhaps, in a future tutorial, we can look at how to build Alacritty from source. It isn't too hard, it just has more steps.
1. Add Alacritty ppa.
Launch your terminal and type the following
sudo add-apt-repository ppa:mmstick76/alacritty
You may be prompted to enter your sudo password, if you are, enter it in and continue.
2. Update your repositories
After you have successfully added the ppa, update your repositories by typing in the following
sudo apt update
3. Install Alacritty
Following that, you can now install Alacritty with this command
sudo apt install alacritty
And now you have alacritty! 🎉

⭐ Customizing Alacritty
Customizing Alacritty is actually pretty simple. All you need to do is edit a yml file.
1. Create alacritty folder in .config
First we need a place to keep this yml file. To do that, make sure you are in your home directory (it's the default path you're in when you just launch your terminal). Next check for the .config folder by typing the following
ls -a
The -a shows the hidden files as well. Navigate to inside this folder and create a folder named alacritty like this:
sudo cd .config
sudo mkdir alacritty
2. Customise Alacritty using yml.
You can specify different configurations for alacritty including theme, whether it should be fullscreen on startup, keybindings and more, declaratively using yml.
Create a .yml file named alacritty in your .config/alacritty folder.
If you're not sure what to configure, you can copy the contents of this alacritty.yml file over at the official alacritty github repository here into your own yml file.
All the configurations are commented out and you can uncomment out the specific things you would like to customize. If you already have some in mind, go ahead, uncomment and edit. If you're just starting out, try changing something small like say the font and see if you like it then continue customising your terminal through small changes from there. You can also check out this one here for inspiration.
A note on themes
Adding themes in Alacritty is as simple as copying and pasting the theme's color specifications into your alacritty.yml file. A great collection of some good themes and their color specifications can be found here
If you'd like to have multiple themes to switch between them, simply copy and paste multiple color specifications and only uncomment the one you want to use. To use another one, comment the current theme in use and uncomment the one you want. If you'd like to a less cumbersome process, there is a cli tool alacritty-themes which you can learn about here
Test each change to your config file by refreshing and re-launching your alacritty terminal to see how it affects your terminal.
Once you are satisfied with your configurations, you may remove all the commented lines you did not use, leaving out just the uncommented ones which are your final configurations (Unless you'd much rather still keep the commented lines for the future, it's up to you really). If you need anything else, you can always refer back to the links containing the original alacritty.yml files.
And we're done!

⭐ Bonus!
Set Alacritty as your default terminal
If you like Alacritty as much as I do, you may want to set it as your default terminal on Ubuntu. This means that amongst other things, every time you press the keyboard combination ctrl + alt + T the terminal which shall launch shall be Alacritty.
This process is also relatively easy.
Debian-based distributions (including Ubuntu) have a handy command-line utility known as update-alternatives.
Run the following command in your terminal:
sudo update-alternatives --config x-terminal-emulator
You should get a list of choices to choose from and instructions on how to select each choice.
Note:If you're curious about whether to select auto-mode or manual-mode. Auto mode simply let's the system decide which terminal emulator to select as packages are removed or installed. That means if you removed your default terminal emulator, the system would look to see which terminal emulator is in auto-mode and if more than two are, would pick the one with the highest priority.
Select. Exit your terminal and try pressing ctrl + alt + T. Alacritty should launch instead of your previous default terminal emulator.
I hope you found this article helpful. Till next time 👋🏾




所有评论(0)