{"id":40747,"date":"2022-06-10T15:57:10","date_gmt":"2022-06-10T15:57:10","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=40747"},"modified":"2024-03-26T14:40:43","modified_gmt":"2024-03-26T14:40:43","slug":"install-gnu-emacs-28-1-ubuntu-22-04-20-04","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2022\/06\/install-gnu-emacs-28-1-ubuntu-22-04-20-04\/","title":{"rendered":"How to Install GNU Emacs (29.3 Updated) in Ubuntu 22.04 | 20.04"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/emacs-icon.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-36513\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/emacs-icon-250x250.webp\" alt=\"\" width=\"250\" height=\"250\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/emacs-icon-250x250.webp 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/emacs-icon-300x300.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/emacs-icon-600x600.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/emacs-icon-768x768.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/12\/emacs-icon.webp 1200w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><\/p>\n<p>This simple tutorial shows how to install the GNU Emacs text editor 29.3 and keep up-to-date in Ubuntu 22.04, Ubuntu 20.04.<\/p>\n<p>GNU Emacs text editor has reached v29.x release series for few months, though Ubuntu still has v27.1 in its universe repository. For those would like to install\/upgrade the editor, here are 3 different ways to do the trick in Ubuntu and its based systems.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-40755\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/06\/emacs28-600x455.webp\" alt=\"\" width=\"600\" height=\"455\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/06\/emacs28-600x455.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/06\/emacs28-300x228.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/06\/emacs28-768x583.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/06\/emacs28.webp 871w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<h3>Method 1: Snap Package<\/h3>\n<p>Snap is an universal Linux package format that runs in sandbox. It works on most Linux, and updates automatically when a new release is published. GNU Emacs is available as Snap with support for <code>amd64<\/code> modern PC\/laptop, <code>arm64\/armhf<\/code>, <code>ppc64el<\/code> and <code>s390x<\/code> processors.<\/p>\n<p><b>Ubuntu user can simply search for and install the package from Ubuntu Software.<\/b> There are multiple app packages in software center, select install the one from &#8220;Snap Store&#8221;.<\/p>\n<div id=\"attachment_40749\" style=\"width: 610px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-40749\" class=\"size-large wp-image-40749\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/06\/emacs-snap-600x352.webp\" alt=\"\" width=\"600\" height=\"352\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/06\/emacs-snap-600x352.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/06\/emacs-snap-300x176.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/06\/emacs-snap-768x450.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/06\/emacs-snap.webp 952w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><p id=\"caption-attachment-40749\" class=\"wp-caption-text\">Install Emacs from Ubuntu Software<\/p><\/div>\n<p>For other Linux, it&#8217;s available to install via <a href=\"https:\/\/snapcraft.io\/emacs\" target=\"_blank\" rel=\"noopener\">https:\/\/snapcraft.io\/emacs<\/a><\/p>\n<h3>Method 2: Ubuntu PPA<\/h3>\n<p>For those do NOT like applications run in sandbox, there&#8217;s an <a href=\"https:\/\/launchpad.net\/~ubuntuhandbook1\/+archive\/ubuntu\/emacs\" target=\"_blank\" rel=\"noopener\">Ubuntu PPA<\/a> contains the native <code>.deb<\/code> package for Ubuntu 22.04, Ubuntu 20.04, and Ubuntu 24.04.<\/p>\n<p>Like the Snap and Flatpak packages, it&#8217;s a third-party repository. Though the maintainer has been working on the PPA for more than 5 years. Also, it supports for <code>amd64<\/code>, <code>arm64\/armhf<\/code>, and <code>ppc64el<\/code> CPU architecture types.<\/p>\n<p>1. Firstly, press Ctrl+Alt+T on keyboard to open terminal. Run command to remove the old emacs package if any, since <b>it conflicts to the package from PPA.<\/b><\/p>\n<pre>sudo apt remove --autoremove emacs emacs-common<\/pre>\n<p>2. Then, run the command below to add the PPA:<\/p>\n<pre>sudo add-apt-repository ppa:ubuntuhandbook1\/emacs<\/pre>\n<p><i>Type user password (no asterisk feedback) when it asks and hit Enter to continue.<\/i><\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/08\/emacs291-ppa-jammy.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-44197\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/08\/emacs291-ppa-jammy-600x388.webp\" alt=\"\" width=\"600\" height=\"388\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/08\/emacs291-ppa-jammy-600x388.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/08\/emacs291-ppa-jammy-300x194.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/08\/emacs291-ppa-jammy.webp 768w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>3. Then run the command to update system package cache, which should be done automatically in Ubuntu 20.04 and higher during adding PPA.<\/p>\n<pre>sudo apt update<\/pre>\n<p>4. Finally, install Emacs via command:<\/p>\n<pre>sudo apt install emacs emacs-common<\/pre>\n<p>Here you may replace <code>emacs<\/code> with <code>emacs-nox<\/code> for text-only interface.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/08\/apt-emacs.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-44194\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/08\/apt-emacs-600x421.webp\" alt=\"\" width=\"600\" height=\"421\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/08\/apt-emacs-600x421.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/08\/apt-emacs-300x211.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/08\/apt-emacs.webp 759w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<h3>Method 3: Emacs Flatpak<\/h3>\n<p>The text editor is also available as the universal Flatpak package which runs in sandbox. Like Snap, the package runs in most Linux and it&#8217;s easy to update. However, it takes more disk space due to run-time libraries.<\/p>\n<p>1. First, press Ctrl+Alt+T on keyboard to open terminal. When it opens, run command to install the flatpak daemon:<\/p>\n<pre>sudo apt install flatpak<\/pre>\n<p>2. Then, install Emacs as Flatpak via command:<\/p>\n<pre>flatpak install https:\/\/dl.flathub.org\/repo\/appstream\/org.gnu.emacs.flatpakref<\/pre>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/06\/flatpak-emacs.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-40754\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/06\/flatpak-emacs-600x407.webp\" alt=\"\" width=\"600\" height=\"407\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/06\/flatpak-emacs-600x407.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/06\/flatpak-emacs-300x203.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/06\/flatpak-emacs-768x521.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/06\/flatpak-emacs.webp 786w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<h3>How to Remove Emacs text editor<\/h3>\n<p>The Emacs Snap, Flatpak and Deb packages can be installed all together in your system. So, there may be duplicated app icons when you try to launch the editor.<\/p>\n<p>To remove the Snap package, either use Ubuntu Software or run command in terminal:<\/p>\n<pre>sudo snap remove emacs<\/pre>\n<p>To remove the Flatpak package, use command:<\/p>\n<pre>flatpak uninstall --delete-data org.gnu.emacs<\/pre>\n<p>And clear useless runtime via <code>flatpak uninstall --unused<\/code>.<\/p>\n<p>To remove the Deb package, run command:<\/p>\n<pre>sudo apt remove --autoremove emacs emac-common<\/pre>\n<p>And remove the Ubuntu PPA via command:<\/p>\n<pre>sudo add-apt-repository --remove ppa:ubuntuhandbook1\/emacs<\/pre>","protected":false},"excerpt":{"rendered":"<p>This simple tutorial shows how to install the GNU Emacs text editor 29.3 and keep up-to-date in Ubuntu 22.04, Ubuntu 20.04. GNU Emacs text editor has reached v29.x release series for few months, though Ubuntu still has v27.1 in its universe repository. For those would like to install\/upgrade the editor, here are 3 different ways [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":36513,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[597],"class_list":["post-40747","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-text-editor"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/40747","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=40747"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/40747\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/36513"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=40747"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=40747"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=40747"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}