{"id":7165,"date":"2021-06-12T13:11:08","date_gmt":"2021-06-12T13:11:08","guid":{"rendered":"https:\/\/linuxways.net\/?p=7165"},"modified":"2021-06-12T13:11:08","modified_gmt":"2021-06-12T13:11:08","slug":"how-to-install-emacs-editor-in-debian-10","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/debian\/how-to-install-emacs-editor-in-debian-10\/","title":{"rendered":"How to Install Emacs Editor in Debian 10"},"content":{"rendered":"<p>Emacs is an extensively used text editing tool available for most Linux systems. It is an open-source tool known for its powerful and plenty of editing features. It is a customizable and extensible text editor which does more than just editing the text.<\/p>\n<p>In an earlier post, we described the <a href=\"https:\/\/linuxways.net\/de\/ubuntu\/how-to-install-emacs-editor-in-ubuntu-20-04\/\">installation of Emacs on Ubuntu OS<\/a>. In today\u2019s post, we will cover the installation of Emacs on Debian OS. As with Linux, there are plenty of ways to do any task, the same is true for software installation. You can install Emacs on Debian using three different ways:<\/p>\n<ul>\n<li>Installing Emacs using Apt<\/li>\n<li>Installing Emacs using Snap Package Manager<\/li>\n<li>Installing Emacs from Source<\/li>\n<\/ul>\n<p><strong>Note<\/strong>: The installation procedure demonstrated here has been tested on <strong>Debian 10 <\/strong>machine<strong>.<\/strong><\/p>\n<h2>Installing Emacs Using apt<\/h2>\n<p>In this procedure, we will install Emacs using the apt command-line utility. As of June 2021, the available version of Emacs in the default repositories is <strong>26.1<\/strong>. Let\u2019s see how to use the apt command-line utility to install Emacs on the Debian system.<\/p>\n<p>1. Run the command below to update the local repositories index with information of new &amp; updated packages.<\/p>\n<pre>$ sudo apt update<\/pre>\n<p>Provide the sudo password.<\/p>\n<p>2. Then run the command below to install Emacs:<\/p>\n<pre>$ sudo apt install Emacs<\/pre>\n<p>If it prompts you with the<strong> Y\/n<\/strong> option, press <strong>y<\/strong> key to continue.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1051\" height=\"347\" class=\"wp-image-7166\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-384.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-384.png 1051w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-384-300x99.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-384-1024x338.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-384-768x254.png 768w\" sizes=\"auto, (max-width: 1051px) 100vw, 1051px\" \/><\/p>\n<p>3. When the installation is finished, you can verify it using the command below:<\/p>\n<pre>$ emacs --version<\/pre>\n<p>The output below verifies that Emacs version 26.1 has been installed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"554\" height=\"75\" class=\"wp-image-7167\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-385.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-385.png 554w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-385-300x41.png 300w\" sizes=\"auto, (max-width: 554px) 100vw, 554px\" \/><\/p>\n<h2>Installing Emacs via Snap<\/h2>\n<p>In this procedure, we will install Emacs using the Snap package manager. As of June 2021, the latest available version of the Emacs snap package is <strong>27.2<\/strong>. Let\u2019s see how to use Snap package manager to install Emacs:<\/p>\n<p>1. Run the command below to update the local repositories index with information of new &amp; updated packages.<\/p>\n<pre>$ sudo apt update<\/pre>\n<p>Provide the sudo password.<\/p>\n<p>2. Run the command below to install snapd (if not already installed):<\/p>\n<pre>$ sudo apt install snapd<\/pre>\n<p>3. Then install snap core using the command below:<\/p>\n<pre>$ sudo snap install core<\/pre>\n<p>4. Now in order to install the Emacs snap package, use the command below in the Terminal:<\/p>\n<pre>$ sudo snap install emacs --classic<\/pre>\n<p>After running the above command, the installation will be started. It will take a little time and once completed, you will see a similar output as shown in the below screenshot.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"671\" height=\"79\" class=\"wp-image-7168\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-386.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-386.png 671w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-386-300x35.png 300w\" sizes=\"auto, (max-width: 671px) 100vw, 671px\" \/><\/p>\n<p>5. You can also verify the installation of Emacs using the command below:<\/p>\n<pre>$ emacs --version<\/pre>\n<p>The output below verifies that Emacs version 27.2 has been installed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"674\" height=\"80\" class=\"wp-image-7169\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-387.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-387.png 674w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-387-300x36.png 300w\" sizes=\"auto, (max-width: 674px) 100vw, 674px\" \/><\/p>\n<h2>Installing Emacs from Source<\/h2>\n<p>In this procedure, we will install Emacs from the source. This procedure involves downloading the source code from the GNU Emacs official <a href=\"https:\/\/www.gnu.org\/software\/emacs\/download.html\">Downloads<\/a> page and then compiling it. Using this method, you can install the latest or any other available version of Emacs available on the official website. Let\u2019s see how to install Emacs from the source:<\/p>\n<p>1. First install the build-essential package. It will automatically install certain packages that we require for compiling the source code.<\/p>\n<pre>$ sudo apt-get install build-essential<\/pre>\n<p>2. Then use the below command to install the dependencies needed for building Emacs:<\/p>\n<pre>$ sudo apt-get build-dep emacs<\/pre>\n<p>3. Download the Emacs source code. Visit the below link and when the website opens, click the <strong>nearby GNU mirror<\/strong>. From the mirrors page, you will see a list of new and older versions of Emacs packages. Download the one (in <strong>tar.gz<\/strong> format) you want to install on your system.<\/p>\n<p><a href=\"https:\/\/www.gnu.org\/software\/emacs\/download.html\">https:\/\/www.gnu.org\/software\/emacs\/download.html<\/a><\/p>\n<p>Here, we have downloaded the <strong>emacs-27.2.tar.xz<\/strong> source package.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1032\" height=\"503\" class=\"wp-image-7170\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-388.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-388.png 1032w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-388-300x146.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-388-1024x499.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-388-768x374.png 768w\" sizes=\"auto, (max-width: 1032px) 100vw, 1032px\" \/><\/p>\n<p>4. As the downloaded package is an archive file, we will need to extract its content. Use the command below to extract the archive.<\/p>\n<pre>$ sudo tar -xf emacs-27.2.tar.xz<\/pre>\n<p>Replace <strong>emacs-27.2.tar.xz<\/strong> with your archive name. After extracting the archive, use the <em>ls<\/em> command which will show you a directory with the same name as your Emacs source code package (but without <strong>tar.gz<\/strong> at the end of its name).<\/p>\n<p>5. Use the <em>cd<\/em> command to move inside the extracted directory.<\/p>\n<pre>$ cd emacs-27.2\/<\/pre>\n<p>6. Now run the command below to check your system for the dependencies required for building the source code:<\/p>\n<pre>$ sudo .\/configure<\/pre>\n<p>7. Then use the command below to compile the source code:<\/p>\n<pre>$ sudo make<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"753\" height=\"475\" class=\"wp-image-7171\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-389.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-389.png 753w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-389-300x189.png 300w\" sizes=\"auto, (max-width: 753px) 100vw, 753px\" \/><\/p>\n<p>8. After the compilation is done, use the command below to install it:<\/p>\n<pre>$ sudo make install<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"809\" height=\"230\" class=\"wp-image-7172\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-390.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-390.png 809w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-390-300x85.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-390-768x218.png 768w\" sizes=\"auto, (max-width: 809px) 100vw, 809px\" \/><\/p>\n<p>Emacs should now be installed on your system.<\/p>\n<p>9. To verify the installation of Emacs, use the command below:<\/p>\n<pre>$ emacs --version<\/pre>\n<p>The output below verifies that Emacs version <strong>27.2<\/strong> has been installed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"652\" height=\"78\" class=\"wp-image-7173\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-391.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-391.png 652w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-391-300x36.png 300w\" sizes=\"auto, (max-width: 652px) 100vw, 652px\" \/><\/p>\n<h2>Launch Emacs<\/h2>\n<p>You can launch Emacs either from the command line or from the GUI.<\/p>\n<p>To launch Emacs from the command line, type <em>emacs<\/em> and hit <strong>Enter<\/strong>:<\/p>\n<pre>$ emacs<\/pre>\n<p>To launch Emacs from the GUI, click the <strong>Activities<\/strong> in the upper most corner of your desktop. Then search and Launch Emacs using the search area at the top.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"419\" height=\"253\" class=\"wp-image-7174\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-392.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-392.png 419w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-392-300x181.png 300w\" sizes=\"auto, (max-width: 419px) 100vw, 419px\" \/><\/p>\n<p>You will see this default window after launching Emacs.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"551\" height=\"547\" class=\"wp-image-7175\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-393.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-393.png 551w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-393-300x298.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-393-150x150.png 150w\" sizes=\"auto, (max-width: 551px) 100vw, 551px\" \/><\/p>\n<h2>Uninstall Emacs<\/h2>\n<p>For some reason if you no longer need Emacs on your system, you can uninstall it easily using the below-described methods:<\/p>\n<p>1. If you have installed Emacs using apt, you can uninstall it as follows:<\/p>\n<pre>$ sudo apt remove emacs<\/pre>\n<p>2. If you have installed Emacs using snap, you can uninstall it as follows:<\/p>\n<pre>$ sudo snap remove emacs<\/pre>\n<p>3. If you have installed Emacs from the source, you can uninstall it as follows:<\/p>\n<p>Move inside the Emacs extracted directory:<\/p>\n<pre>$ cd emacs-27.2\/<\/pre>\n<p>Then uninstall it:<\/p>\n<pre>$ sudo make uninstall<\/pre>\n<p>In this post, we have described three different methods to install Emacs on Debian OS. Based on your preferences, you can choose among any of these methods.<\/p>","protected":false},"excerpt":{"rendered":"<p>Emacs is an extensively used text editing tool available for most Linux systems. It is an open-source tool known for its powerful and plenty of editing features. It&hellip;<\/p>","protected":false},"author":1,"featured_media":7241,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[17,143],"class_list":["post-7165","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-debian","tag-debian-10","tag-emacs-editor"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/7165","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=7165"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/7165\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/7241"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=7165"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=7165"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=7165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}