How To Install Fedora Linux In Termux

h4ck3r

Updated on:

Install Fedora Linux in Termux

Install Fedora Linux In Termux
How To Install Fedora Linux In Termux 2

Linux enthusiasts often seek ways to explore and experiment with different distributions on their mobile devices. One such intriguing endeavor is installing Fedora Linux on an Android device using Termux, a powerful terminal emulator. In this comprehensive guide, we will walk you through the steps to install Fedora Linux within Termux, providing you with a Linux environment right at your fingertips.

Preparing Your Android Device

Before diving into the installation process, ensure that your Android device is prepared for this endeavor. Here are some essential prerequisites:

  1. Sufficient Storage: Ensure your device has enough free space for the Fedora installation (at least 5GB).
  2. A Robust Internet Connection: You’ll need a stable and fast internet connection for downloading packages.
  3. Android Version: Running Fedora in Termux might require a relatively modern Android version (7.0 and above).
  4. A Rooted Device (Optional): While not mandatory, some features may require a rooted device for full functionality.

Installing Termux

Termux is your gateway to running Fedora Linux on your Android device. Follow these steps to install it:

  1. Open the F droid on your Android device.
  2. Search for “Termux” using the search bar.
  3. Click on the Termux app and tap “Install” to begin the installation.
  4. Once installed, open Termux to access the terminal emulator.

Setting Up Storage

Now that you have Termux installed, let’s prepare your storage for the Fedora installation:

  1. To create a new directory for Fedora, use the following command:
   mkdir ~/fedora
  1. Change the directory to your newly created Fedora folder:
   cd ~/fedora
  1. Download the Fedora root filesystem for Termux using the following command:
   curl -O https://fedoraproject.org/static/34/fedora-34-1.2/aarch64/rootfs.tar.xz
  1. Extract the downloaded root filesystem:
   tar xvf rootfs.tar.xz

Initializing Fedora Installation

With the root filesystem downloaded and extracted, it’s time to set up your Fedora installation:

  1. Initialize the Fedora installation process:
   proot -r fedora-34-aarch64 -0
  1. You will be greeted with a Fedora shell prompt.

Alternate Method

apt update && apt upgrade -y
pkg update -y && pkg install curl proot tar -y && curl https://raw.githubusercontent.com/AndroidnixApp/AndronixOrigin/massh|bashter/Installer/Fedora/fedora-xfce
bash fedora.sh

Configuring the Chroot Environment

Now that you’re inside the Fedora shell prompt, configure the environment:

  1. Update the package manager repository:
   dnf update -y
  1. Set the root password for your Fedora installation:
   passwd
  1. Create a new user account:
   useradd -m -G wheel yourusername
  1. Set the password for your new user account:
   passwd yourusername

Installing Fedora Packages

With the initial configuration in place, you can start installing packages:

  1. To make your Fedora installation more functional, install basic utilities like a text editor (e.g., Nano) and the sudo package:
   dnf install nano sudo -y
  1. Edit the sudoers file to grant your user account administrative privileges:
   visudo

Add the following line to allow your user to use sudo without a password:

   yourusername ALL=(ALL) NOPASSWD:ALL

Save and exit the editor.

Configuring Network Access

Network connectivity is crucial for updates and installing additional software. Ensure that your Fedora installation can access the internet:

  1. Check your network connection status:
   ping google.com

If the ping command works, your network connection is active. If not, check your Android device’s network settings. Install Fedora Linux in Termux

  1. If you’re behind a proxy, configure the proxy settings in your Fedora installation to ensure internet access.

Running Fedora Linux in Termux

You’re almost there! Now, let’s run Fedora Linux in your Termux terminal: Install Fedora Linux in Termux

  1. Exit the Fedora shell by typing:
   exit
  1. To enter the Fedora environment again, use the following command:
   proot -r fedora-34-aarch64 -0
  1. You should now be inside your Fedora Linux environment within Termux.

Troubleshooting Common Issues

While installing Fedora Linux in Termux is a fascinating endeavor, it may encounter some common issues. Here are a few troubleshooting tips: Install Fedora Linux in Termux

Storage Space: Ensure you have enough free space on your device for Fedora installation. You may need to remove unnecessary files or apps.

Root Access: Some features may require a rooted Android device. Be aware of limitations if your device is not rooted.

Network Connectivity: Verify that your Android device has a working internet connection, as Fedora Linux relies on it for package installation and updates.

Permission Errors: Ensure proper permissions when executing commands, especially during package installations.

Compatibility: Confirm that your device’s architecture is compatible with the Fedora root filesystem you’ve chosen.

Conclusion

Congratulations! You’ve successfully installed Fedora Linux in Termux on your Android device. You now have a fully functional Linux environment that you can explore, experiment with, and use for various tasks right from your smartphone or tablet.Install Fedora Linux in Termux

This guide has walked you through the installation process step by step, from preparing your device to configuring Fedora and troubleshooting common issues. With your Fedora Linux installation in Termux, you can enjoy the flexibility and power of Linux on your mobile device like never before. Happy exploring!

Leave a Comment