If you're just interested in the Alacritty binary and you don't need the terminfo file, desktop entry, manual page or shell completions, you can install it directly through cargo:
cargo install alacritty
Before compiling Alacritty, you'll have to first clone the source code:
git clone https://github.com/alacritty/alacritty.git
cd alacritty
-
Install
rustup.rs
. -
To make sure you have the right Rust compiler installed, run
rustup override set stable rustup update stable
These are the minimum dependencies required to build Alacritty, please note that with some setups additional dependencies might be desired.
If you're running Wayland with an Nvidia GPU, you'll likely want the EGL
drivers installed too (these are called libegl1-mesa-dev
on Ubuntu).
If you'd like to build a local version manually, you need a few extra libraries to build Alacritty. Here's an apt command that should install all of them. If something is still found to be missing, please open an issue.
apt-get install cmake pkg-config libfreetype6-dev libfontconfig1-dev libxcb-xfixes0-dev python3
On Arch Linux, you need a few extra libraries to build Alacritty. Here's a
pacman
command that should install all of them. If something is still found
to be missing, please open an issue.
pacman -S cmake freetype2 fontconfig pkg-config make libxcb
On Fedora, you need a few extra libraries to build Alacritty. Here's a dnf
command that should install all of them. If something is still found to be
missing, please open an issue.
dnf install cmake freetype-devel fontconfig-devel libxcb-devel g++
On CentOS/RHEL 7, you need a few extra libraries to build Alacritty. Here's a yum
command that should install all of them. If something is still found to be
missing, please open an issue.
yum install cmake freetype-devel fontconfig-devel libxcb-devel xcb-util-devel
yum group install "Development Tools"
On openSUSE, you need a few extra libraries to build Alacritty. Here's
a zypper
command that should install all of them. If something is
still found to be missing, please open an issue.
zypper install cmake freetype-devel fontconfig-devel libxcb-devel
Compiles out of the box for 14.2
On Void Linux, install following packages before compiling Alacritty:
xbps-install cmake freetype-devel expat-devel fontconfig-devel libxcb-devel pkg-config python3
On FreeBSD, you need a few extra libraries to build Alacritty. Here's a pkg
command that should install all of them. If something is still found to be
missing, please open an issue.
pkg install cmake freetype2 fontconfig pkgconf
On OpenBSD 6.5, you need Xenocara and Rust to build Alacritty, plus Python 3 to build its XCB dependency. If something is still found to be missing, please open an issue.
pkg_add rust python
Select the package for Python 3 (e.g. python-3.6.8p0
) when prompted.
The default user limits in OpenBSD are insufficient to build Alacritty. A
datasize-cur
of at least 3GB is recommended (see login.conf).
On Solus, you need a few extra libraries to build
Alacritty. Here's a eopkg
command that should install all of them. If
something is still found to be missing, please open an issue.
eopkg install fontconfig-devel
The following command can be used to get a shell with all development dependencies on NixOS.
nix-shell -A alacritty '<nixpkgs>'
On Gentoo, you need a few extra libraries to build Alacritty. The following command should install all of them. If something is still found to be missing, please open an issue.
emerge --onlydeps x11-terms/alacritty
On Clear Linux, you need a few extra libraries to build Alacritty. Here's a
swupd
command that should install all of them. If something is still found
to be missing, please open an issue.
swupd bundle-add devpkg-expat devpkg-freetype devpkg-libxcb devpkg-fontconfig
The following command can be used to get a shell with all development dependencies on GNU Guix.
guix environment alacritty
On Alpine Linux, you need a few extra libraries to build Alacritty. Here's an
apk
command that should install all of them. If something is still found to
be missing, please open an issue.
sudo apk add cmake pkgconf freetype-dev fontconfig-dev python3 libxcb-dev
On windows you will need to have the {architecture}-pc-windows-msvc
toolchain
installed as well as Clang 3.9 or greater.
If you build Alacritty on another distribution, we would love some help filling in this section of the README.
cargo build --release
If all goes well, this should place a binary at target/release/alacritty
.
On Windows this directory should also contain the winpty-agent.exe
.
make app
cp -r target/release/osx/Alacritty.app /Applications/
There are some extra things you might want to set up after installing Alacritty. All the post build instruction assume you're still inside the Alacritty repository.
To make sure Alacritty works correctly, either the alacritty
or
alacritty-direct
terminfo must be used. The alacritty
terminfo will be
picked up automatically if it is installed.
If the following command returns without any errors, the alacritty
terminfo is
already installed:
infocmp alacritty
If it is not present already, you can install it globally with the following command:
sudo tic -xe alacritty,alacritty-direct extra/alacritty.info
Many Linux and BSD distributions support desktop entries for adding applications to system menus. This will install the desktop entry for Alacritty:
sudo cp target/release/alacritty /usr/local/bin # or anywhere else in $PATH
sudo cp extra/logo/alacritty-term.svg /usr/share/pixmaps/Alacritty.svg
sudo desktop-file-install extra/linux/Alacritty.desktop
sudo update-desktop-database
If you are having problems with Alacritty's logo, you can replace it with
prerendered PNGs and simplified SVGs available in the extra/logo/compat
directory.
Installing the manual page requires the additional dependency gzip
.
sudo mkdir -p /usr/local/share/man/man1
gzip -c extra/alacritty.man | sudo tee /usr/local/share/man/man1/alacritty.1.gz > /dev/null
To get automatic completions for Alacritty's flags and arguments you can install the provided shell completions.
To install the completions for zsh, you can place the extra/completions/_alacritty
file in any
directory referenced by $fpath
.
If you do not already have such a directory registered through your ~/.zshrc
, you can add one like this:
mkdir -p ${ZDOTDIR:-~}/.zsh_functions
echo 'fpath+=${ZDOTDIR:-~}/.zsh_functions' >> ${ZDOTDIR:-~}/.zshrc
Then copy the completion file to this directory:
cp extra/completions/_alacritty ${ZDOTDIR:-~}/.zsh_functions/_alacritty
To install the completions for bash, you can source
the extra/completions/alacritty.bash
file
in your ~/.bashrc
file.
If you do not plan to delete the source folder of alacritty, you can run
echo "source $(pwd)/extra/completions/alacritty.bash" >> ~/.bashrc
Otherwise you can copy it to the ~/.bash_completion
folder and source it from there:
mkdir -p ~/.bash_completion
cp extra/completions/alacritty.bash ~/.bash_completion/alacritty
echo "source ~/.bash_completion/alacritty" >> ~/.bashrc
To install the completions for fish, run
mkdir -p $fish_complete_path[1]
cp extra/completions/alacritty.fish $fish_complete_path[1]/alacritty.fish