{"id":134174,"date":"2023-07-19T08:00:00","date_gmt":"2023-07-19T08:00:00","guid":{"rendered":"https:\/\/fedoramagazine.org\/?p=38333"},"modified":"2023-07-19T08:00:00","modified_gmt":"2023-07-19T08:00:00","slug":"how-to-install-and-update-fedora-linux-on-android-using-termux","status":"publish","type":"post","link":"https:\/\/sickgaming.net\/blog\/2023\/07\/19\/how-to-install-and-update-fedora-linux-on-android-using-termux\/","title":{"rendered":"How to Install and Update Fedora Linux on Android using Termux"},"content":{"rendered":"<p>If you&#8217;re interested in running Linux on your Android device, you&#8217;re in luck! It&#8217;s possible to install Fedora Linux on Android using Termux. Termux is a terminal emulator for Android that allows you to run Linux commands and utilities on your phone or tablet. It does not replace Android. In this article, we&#8217;ll walk you through the process of installing Fedora Linux on Android using Termux and show you how to keep it up to date with the latest versions.<\/p>\n<p> <span id=\"more-38333\"><\/span> <\/p>\n<h2 class=\"wp-block-heading\">Step by step process <\/h2>\n<p><em><strong>Step 1: Install Termux<\/strong><\/em><\/p>\n<p>To get started, you need to install <a href=\"https:\/\/termux.dev\/en\/\" target=\"_blank\" rel=\"noreferrer noopener\">Termux<\/a> from the Google Play Store. Once you have Termux installed, open it up and type the following command to update the package list:<\/p>\n<pre class=\"wp-block-preformatted\">pkg update<\/pre>\n<p>Note: Termux requires Android &gt;= 7 to run. Support for Android 5 and 6 was dropped at v0.83 on 2020-01-01, but you can find old builds on archive.org ( <a href=\"https:\/\/archive.org\/details\/termux-repositories-legacy\/\">https:\/\/archive.org\/details\/termux-repositories-legacy\/<\/a> ) if needed.<\/p>\n<p><em><strong>Step 2: Install Proot-Distro<\/strong><\/em><\/p>\n<p>Next, you&#8217;ll need to install <a href=\"https:\/\/github.com\/termux\/proot-distro\/blob\/master\/README.md\" target=\"_blank\" rel=\"noreferrer noopener\">Proot-Distro<\/a>. Proot-Distro is a tool that allows you to install and run Linux distributions in a chroot environment. To install Proot-Distro, run the following command:<\/p>\n<pre class=\"wp-block-preformatted\">pkg install proot-distro<\/pre>\n<p>Step 3: Install Fedora<\/p>\n<p>With Proot-Distro installed, you can now use it to install Fedora. To install Fedora, run the following command:<\/p>\n<pre class=\"wp-block-preformatted\">proot-distro install fedora<\/pre>\n<p>This will download and install the latest version of Fedora.<\/p>\n<p><em><strong>Step 4: Configure dnf<\/strong><\/em><\/p>\n<p>Now that you have Fedora installed, you&#8217;ll need to configure <em>dnf<\/em>, Fedora&#8217;s package manager. By default, <em>dnf<\/em> may try to install SELinux packages, which won&#8217;t work properly in a chroot environment. To prevent this, exclude SELinux packages installation by editing the <em>dnf<\/em> configuration file. Run the following command to open the <em>dnf<\/em> configuration file for editing :<\/p>\n<pre class=\"wp-block-preformatted\">cd ..\/usr\/var\/lib\/proot-distro\/installed-rootfs\/fedora\/etc\/dnf\nvi dnf.conf<\/pre>\n<p>You may substitute the <em>nano <\/em> editor for <em>vi<\/em>, if it is more to your liking. Once you&#8217;re in the file, find the line that says <em>excludepkgs=<\/em> and add <em>*selinux*<\/em> to the end of the line, like so:<\/p>\n<pre class=\"wp-block-preformatted\">excludepkgs=*selinux*<\/pre>\n<p>It may be necessary to add the <em>excludepkgs <\/em>line. Save these changes and exit the editor.<\/p>\n<p><em><strong>Step 5: Install a Desktop Environment (Optional)<\/strong><\/em><\/p>\n<p>Fedora comes with a number of desktop environments to choose from. If you&#8217;d like to install a desktop environment, you can do so with the following commands:<\/p>\n<pre class=\"wp-block-preformatted\">proot-distro login fedora\ndnf groupinstall \"Fedora Workstation\" --skip-broken<\/pre>\n<p>This will switch from termux into the chroot Fedora installation and install the GNOME desktop environment, along with a number of other packages. If you prefer a different desktop environment, you can replace <em>Fedora Workstation<\/em> with the name of the group for your preferred environment.<\/p>\n<p><em><strong>Step 6: Install VNC Server (Optional)<\/strong><\/em><\/p>\n<p>If you plan on using your Fedora installation with a graphical interface, you&#8217;ll need to install a VNC server. This will allow you to connect to the Fedora desktop from another computer or device. To install the TigerVNC server, run the following command:<\/p>\n<pre class=\"wp-block-preformatted\">dnf install tigervnc-server.aarch64 -y<\/pre>\n<p>This will install the VNC server, along with any necessary dependencies.<\/p>\n<p><em><strong>Step 7: Upgrading Fedora<\/strong><\/em><\/p>\n<p>Now that you have Fedora installed, you&#8217;ll want to keep it up to date with the latest versions. To upgrade Fedora, run the following commands:<\/p>\n<pre class=\"wp-block-preformatted\">sudo dnf upgrade --refresh\nsudo dnf install dnf-plugin-system-upgrade\nsudo dnf system-upgrade download \u2013releasever=37\nexport DNF_SYSTEM_UPGRADE_NO_REBOOT=1\nsudo -E dnf system-upgrade reboot\nsudo -E dnf system-upgrade upgrade\nsudo dnf upgrade --refresh<\/pre>\n<p>First command <em>sudo dnf upgrade &#8211;refresh <\/em> refreshes the package cache and updates any installed packages.<\/p>\n<p>The second command <em>sudo dnf install dnf-plugin-system-upgrade<\/em> installs the <em>dnf-plugin-system-upgrade<\/em> package, needed for the upgrade process.<\/p>\n<p>The third command <em>sudo dnf system-upgrade download &#8211;releasever=37<\/em> downloads the necessary packages for the upgrade to version 37 of Fedora. Replace <em>37<\/em> with the desired release version.<\/p>\n<p>The fourth command <em>export DNF_SYSTEM_UPGRADE_NO_REBOOT=1<\/em> sets an environment variable to prevent the system from rebooting after the upgrade.<\/p>\n<p>The fifth command <em>sudo -E dnf system-upgrade reboot<\/em> reboots the system to start the upgrade process. Make sure to save any important work before running this command.<\/p>\n<p>The sixth command <em>sudo -E dnf system-upgrade upgrade<\/em> performs the upgrade process.<\/p>\n<p>Finally, the seventh command <em>sudo dnf upgrade &#8211;refresh<\/em> updates any remaining packages and ensures that your system is fully up to date.<\/p>\n<h2 class=\"wp-block-heading\">Errors Encountered<\/h2>\n<p>During the installation and upgrade process, you may encounter errors. Two common errors are described below, along with their solutions.<\/p>\n<p><em><strong>Error 1:<\/strong><\/em> sudo: \/etc\/sudo.conf is owned by uid 1001, should be 0<br \/><em><strong>Solution:<\/strong><\/em> This error occurs when the ownership of the <em>sudo.conf<\/em> file is incorrect. To fix this, run the following command:<\/p>\n<pre class=\"wp-block-preformatted\">chmod +s \/usr\/bin\/sudo<\/pre>\n<p>This sets the setuid bit on the <em>sudo<\/em> command, which allows it to run with root privileges.<\/p>\n<p><em><strong>Error 2:<\/strong><\/em> filesystem package didn&#8217;t get upgraded post OS upgrade<br \/><em><strong>Solution:<\/strong><\/em> This error occurs when the <em>filesystem<\/em> package is not upgraded during the upgrade process. To fix this, run the following commands:<\/p>\n<pre class=\"wp-block-preformatted\">sudo rpm -e --nodeps filesystem\ndnf download filesystem<\/pre>\n<p>The first command removes the <em>filesystem<\/em> package, and the second command downloads the latest version of the package. If you encounter any errors during the upgrade process, you can use <em>rpmrebuild<\/em> to rebuild the package with any necessary modifications.<\/p>\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n<p>In this article, we&#8217;ve shown you how to install Fedora Linux on Android using Termux and how to keep it up to date with the latest versions. While there may be some errors to overcome during the installation and upgrade process, following the steps outlined in this article should help you get Fedora up and running on your Android device in no time.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re interested in running Linux on your Android device, you&#8217;re in luck! It&#8217;s possible to install Fedora Linux on Android using Termux. Termux is a terminal emulator for Android that allows you to run Linux commands and utilities on your phone or tablet. It does not replace Android. In this article, we&#8217;ll walk you [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48],"tags":[45,61,1488,43,46,47,1170],"class_list":["post-134174","post","type-post","status-publish","format-standard","hentry","category-fedora-os","tag-fedora","tag-fedora-project-community","tag-five-things-in-fedora-this-week","tag-for-system-administrators","tag-magazine","tag-news","tag-review"],"_links":{"self":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/134174","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/comments?post=134174"}],"version-history":[{"count":0,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/134174\/revisions"}],"wp:attachment":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media?parent=134174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/categories?post=134174"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/tags?post=134174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}