Forked from Aaronmacaron/install-alacritty-ubuntu.sh
Last active
January 16, 2026 13:45
-
-
Save ales-tsurko/cc8cb59f6d5a1aa95512e81e3dfe64ff to your computer and use it in GitHub Desktop.
Install Alacritty on Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This installs alacritty terminal on ubuntu (https://github.com/jwilm/alacritty) | |
| # You have to have rust/cargo installed for this to work | |
| # Install required tools | |
| sudo apt-get install -y cmake libfreetype6-dev libfontconfig1-dev xclip | |
| # Download, compile and install Alacritty | |
| git clone https://github.com/jwilm/alacritty | |
| cd alacritty | |
| cargo build --release | |
| # Add Man-Page entries | |
| 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 | |
| # Add shell completion for bash and zsh | |
| mkdir -p ~/.bash_completion | |
| cp extra/completions/alacritty.bash ~/.bash_completion/alacritty | |
| echo "source ~/.bash_completion/alacritty" >> ~/.bashrc | |
| sudo mkdir -p /usr/share/zsh/functions/Completion/X/ | |
| sudo cp extra/completions/_alacritty /usr/share/zsh/functions/Completion/X/_alacritty | |
| # Copy default config into home dir | |
| cp alacritty.yml ~/.alacritty.yml | |
| # Create desktop file | |
| mkdir -p ~/.local/share/applications/ | |
| cp extra/linux/Alacritty.desktop ~/.local/share/applications/ | |
| # Copy binary to path | |
| sudo cp target/release/alacritty /usr/local/bin | |
| # Remove temporary dir | |
| cd .. | |
| rm -rf alacritty |
Author
I use this command, which combination of posted commands in this gist. Tested on Ubuntu 24.04.3 LTS (Noble Numbat). Thank you guys!
#!/bin/bash
# Install cargo
# curl https://sh.rustup.rs -sSf | sh
# Install required tools
sudo apt-get install -y cmake libfreetype6-dev libfontconfig1-dev xclip
# Download, compile and install Alacritty
git clone https://github.com/jwilm/alacritty
cd alacritty
cargo build --release
# Add Man-Page entries
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
sudo mkdir -p /usr/share/zsh/functions/Completion/X/
sudo cp extra/completions/_alacritty /usr/share/zsh/functions/Completion/X/_alacritty
# Create desktop file
sudo mkdir -p /usr/local/share/applications/
sudo cp extra/linux/Alacritty.desktop /usr/local/share/applications/
# Add icons
sudo mkdir -p /usr/local/share/icons/hicolor/{scalable,symbolic}/apps/
sudo cp extra/logo/alacritty-term.svg /usr/local/share/icons/hicolor/scalable/apps/Alacritty.svg
sudo cp extra/logo/alacritty-simple.svg /usr/local/share/icons/hicolor/symbolic/apps/Alacritty-symbolic.svg
# Copy binary to path
sudo cp target/release/alacritty /usr/local/bin
# Set emualtor to alacritty
gsettings set org.gnome.desktop.default-applications.terminal exec 'alacritty'
sudo update-alternatives --install $(which x-terminal-emulator) x-terminal-emulator $(which alacritty) 40
sudo update-alternatives --config x-terminal-emulator
# Remove temporary dir
cd ..
rm -rf alacritty
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Unrud
This is surprising...
cargo build --releaseusually just normalcargo buildcommand but for release target (i.e. with optimizations). So it should put the build artifacts insidetargetat the source root or$CARGO_TARGET_DIRif it's specified. Are you sure in this?UPD
Hmm But doing
cargo install --path alacritty/doesn't make sense as well, because at the end we copy the binary fromtarget/releaseanyway (which is built bycargo build --releaseas a part ofcargo install). Will update the script.