{"id":45035,"date":"2023-12-30T12:47:14","date_gmt":"2023-12-30T12:47:14","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=45035"},"modified":"2023-12-30T12:47:14","modified_gmt":"2023-12-30T12:47:14","slug":"install-alacritty-gpu-terminal-ubuntu","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2023\/12\/install-alacritty-gpu-terminal-ubuntu\/","title":{"rendered":"How to Install Alacritty (GPU Accelerated Terminal) in Ubuntu"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/alacritty-logo.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-43824\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/alacritty-logo-250x250.webp\" alt=\"\" width=\"250\" height=\"250\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/alacritty-logo-250x250.webp 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/alacritty-logo-300x300.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/alacritty-logo-600x600.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/alacritty-logo-768x768.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/alacritty-logo.webp 1200w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><\/p>\n<p>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.<\/p>\n<p>The terminal emulator features <b>vi mode<\/b>, allows to move around the viewport and scrollback using the keyboard. And, vi search and normal search for anything in the scrollback buffer.<\/p>\n<h3>Option 1: Install Alacritty via Snap package<\/h3>\n<p>For Ubuntu users, the easily way to install the terminal emulator is using the Snap package. It&#8217;s available in Ubuntu Software (App Center for 23.10), though run in sandbox.<\/p>\n<div id=\"attachment_45036\" style=\"width: 620px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/12\/alacritty-appcenter.webp\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-45036\" class=\"size-large wp-image-45036\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/12\/alacritty-appcenter-700x449.webp\" alt=\"\" width=\"610\" height=\"391\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/12\/alacritty-appcenter-700x449.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/12\/alacritty-appcenter-300x192.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/12\/alacritty-appcenter-768x492.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/12\/alacritty-appcenter.webp 1212w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><p id=\"caption-attachment-45036\" class=\"wp-caption-text\">Alacritty terminal emulator in App Center<\/p><\/div>\n<p>Or, user can install it by running the command below in terminal:<\/p>\n<pre>snap install alacritty --classic<\/pre>\n<h3>Option 2: Install Alacritty through Cargo (official)<\/h3>\n<p>The terminal emulator is also available to install through Cargo, the Rust package manager.<\/p>\n<p>1. Just open terminal (Ctrl+Alt+T) and run command to install Cargo first:<\/p>\n<pre>sudo apt install cargo<\/pre>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/apt-cargo.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-43826\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/apt-cargo-600x407.webp\" alt=\"\" width=\"600\" height=\"407\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/apt-cargo-600x407.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/apt-cargo-300x203.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/apt-cargo-768x521.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/03\/apt-cargo.webp 786w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>2. Then, install the required dependency packages:<\/p>\n<pre>sudo apt install cmake pkg-config libfreetype6-dev libfontconfig1-dev libxcb-xfixes0-dev libxkbcommon-dev python3<\/pre>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/12\/apt-alacritty-deps.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-45037\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/12\/apt-alacritty-deps-700x458.webp\" alt=\"\" width=\"610\" height=\"399\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/12\/apt-alacritty-deps-700x458.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/12\/apt-alacritty-deps-300x196.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/12\/apt-alacritty-deps.webp 759w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<p>3. Finally, use cargo to install the terminal package:<\/p>\n<pre>cargo install alacritty<\/pre>\n<p>When done, run <code>~\/.cargo\/bin\/alacritty<\/code> to start the terminal.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/12\/cargo-install-alacritty.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-45038\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/12\/cargo-install-alacritty-700x458.webp\" alt=\"\" width=\"610\" height=\"399\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/12\/cargo-install-alacritty-700x458.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/12\/cargo-install-alacritty-300x196.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/12\/cargo-install-alacritty.webp 759w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<p>4. The cargo package manager does not install the desktop entry for Alacritty. So, you need to manually create one by running command:<\/p>\n<pre>nano ~\/.local\/share\/applications\/alacritty.desktop<\/pre>\n<p>Then, paste following lines in the terminal window:<\/p>\n<pre>[Desktop Entry]\r\nType=Application\r\nExec=\/home\/<b>ji<\/b>\/.cargo\/bin\/alacritty\r\nIcon=alacritty\r\nTerminal=false\r\nCategories=System;TerminalEmulator;\r\nName=Alacritty\r\nComment=A fast, cross-platform, OpenGL terminal emulator\r\nStartupNotify=true\r\nStartupWMClass=Alacritty\r\nActions=New;\r\n\r\n[Desktop Action New]\r\nName=New Terminal\r\nExec=\/home\/<b>ji<\/b>\/.cargo\/bin\/alacrittyalacritty<\/pre>\n<p>NOTE: You need to replace <b>ji<\/b> to your username in the line above. Then, press Ctrl+S to save, and Ctrl+X to exit.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/12\/cargo-install-alacritty-1.webp\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-45039\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/12\/cargo-install-alacritty-1-700x428.webp\" alt=\"\" width=\"610\" height=\"373\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/12\/cargo-install-alacritty-1-700x428.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/12\/cargo-install-alacritty-1-300x183.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/12\/cargo-install-alacritty-1-768x469.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/12\/cargo-install-alacritty-1.webp 813w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<p>For the icon to display, run single command below to download img file and save to local icon folder:<\/p>\n<pre>wget https:\/\/raw.githubusercontent.com\/alacritty\/alacritty\/master\/extra\/logo\/compat\/alacritty-term.png -O ~\/.local\/share\/icons\/alacritty.png<\/pre>\n<p>Or, you can download the icon from <a href=\"https:\/\/github.com\/alacritty\/alacritty\" target=\"_blank\" rel=\"noopener\">github web page<\/a> and manually copy to <code>.local\/share\/icons<\/code> directory.<\/p>\n<h3>Option 3: Ubuntu PPA<\/h3>\n<p>For those who prefer the Ubuntu PPA repository, keep an eye on this <a href=\"https:\/\/launchpad.net\/ubuntu\/+ppas?name_filter=alacritty\" rel=\"noopener\" target=\"_blank\">launchpad page<\/a> for all 3rd party PPAs. <\/p>\n<h3>Uninstall Alacritty<\/h3>\n<p>Depends on how you install the terminal emulator, either remove the Snap package from Ubuntu Software or by command:<\/p>\n<pre>snap remove alacritty<\/pre>\n<p>Or, run command to uninstall the cargo package:<\/p>\n<pre>cargo uninstall alacritty<\/pre>\n<p>You may also remove Cargo itself, if there&#8217;s no other rust packages installed, as well as some dev dependency libraries to free up some disk space.<\/p>\n<pre>sudo apt remove --autoremove cargo cmake pkg-config libfreetype6-dev libfontconfig1-dev libxcb-xfixes0-dev libxkbcommon-dev<\/pre>\n<p>Also remove the desktop entry (shortcut file) by running command:<\/p>\n<pre>rm ~\/.local\/share\/icons\/alacritty.png ~\/.local\/share\/applications\/alacritty.desktop<\/pre>","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":43824,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[243],"class_list":["post-45035","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-terminal"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/45035","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=45035"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/45035\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/43824"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=45035"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=45035"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=45035"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}