To master Android is to wield a pocket-sized kingdom; with Termux and proot, one turns a humble device into a fortress of Linux power.
~ Moon Tzu
Table of Contents
Turning My Android Device into a Linux Machine with Termux and Proot
Let’s be real—using Android can be great, but sometimes it’s like having all the power of a smartphone without the freedom of a true desktop experience. You want that Linux flexibility to run tools, host servers, maybe even customize like a desktop, but then Android gives you a hard no. That’s where I decided to experiment, break a few barriers, and make Android work for me instead of against me.
Enter Termux and proot-distro—the magical combo that makes Linux on Android a breeze. Now, I’m running full Linux distros, with GUI access, and feeling like I’m holding a whole OS in my hand. Here’s the lowdown on how this setup changed everything and how you can make it happen.
Why Termux and Proot-Distro?
First, if you’re wondering why I didn’t go the whole “root your device” route, it’s simple: no root required with Termux and proot-distro. I get to keep Android’s functionality, but now I’m also running Ubuntu, Parrot, or Kali right on top of it. Seriously, no dual boot or complicated partitioning—just pure Linux running on my device like it was always meant to.
- Full Linux Environment: You’re getting the actual deal here. With proot-distro, I can install Ubuntu, Kali, or even Parrot OS, and I get all my Linux tools. I mean, I can run Apache, test server stuff, and even compile code.
- Flexibility to Add Custom Distros: Proot-distro lets you add custom root filesystems (FS) too. So if I feel like tweaking Parrot OS or pulling in Kali for a specific project, I can do that manually by editing the distro files. Just download the root FS, add the SHA, and bam—it’s ready to go.
- Linux Desktop with VNC: Yeah, you heard right. I can actually set up a VNC server to get a desktop interface that I can access in landscape mode, right on my Android. It’s a bit surreal, but when you’re in the middle of some terminal commands and you want that extra desktop space, it’s golden.
Setting It All Up
Here’s the meat of it. Follow these steps, and you’ll have a full Linux environment on your Android device without rooting or any headache.
Step 1: Get Termux Installed
First things first, head over to F-Droid (skip Google Play for this one, trust me) and grab Termux. The F-Droid version is better maintained and more reliable for this.
- Install Termux from F-Droid.
- Open it up, and run a quick update to get started:
pkg update && pkg upgrade
Step 2: Install Proot-Distro
Now, proot-distro is the magic ingredient that lets us download and set up Linux distributions inside Termux. It’s super easy to install:
- Run this command to install proot-distro:
pkg install proot-distro
- Once it’s installed, let’s check out what’s available:
proot-distro list
You’ll see options like Ubuntu, Debian, Alpine, and more.
Step 3: Choose and Install a Distro
For this example, I went with Ubuntu, but you can replace it with whatever you’re vibing with (Kali, anyone?).
- Install Ubuntu with:
proot-distro install ubuntu
- Start it up:
proot-distro login ubuntu
And boom—you’re now inside Ubuntu on your Android device.
Step 4: Set Up VNC for That Desktop Feel
Alright, let’s go the extra mile and set up a VNC server so we can get that desktop experience. Here’s what I did:
- Inside Ubuntu, install a desktop environment and a VNC server. I went with LXDE, but there are other lightweight ones(xfce) too.
apt update
apt install lxde-core tightvncserver
- Start the VNC server and set a password:
vncserver :1
- Connect to it with a VNC viewer app on your Android (I recommend VNC Viewer). Open it, type in
localhost:1
, and you’re in!
Now, I’ve got a full Linux desktop that I can use in landscape mode on my tablet. Multitasking, coding, web browsing—everything’s running as smooth as butter.
Step 5: Manual Addition of Custom Distros (e.g., Parrot OS)
- Background: By default, proot-distro supports a handful of OS images, but it’s possible to add custom distros by editing configuration files and providing necessary URLs and SHA hashes.
- Steps to Add Parrot OS Manually:
- Locate the proot-distro Folder:
cd $PREFIX/etc/proot-distro
- Create a New Distro File for Parrot OS:
- Copy an existing distro file as a base:
cp ubuntu.sh parrot.sh
- Edit
parrot.sh
:- Open the file in a text editor like nano:
nano parrot.sh
- Change the name and provide the Parrot OS root filesystem download link and SHA hash.
DISTRO_NAME="Parrot OS"
TARBALL_URL['aarch64']="https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Rootfs/Parrot/arm64/parrot-rootfs-arm64.tar.xz"
TARBALL_SHA256['aarch64']="af3e4511712313a5c4b24245c6a6f1ffcceedac66d611fee3f805fd6956da92a"
TARBALL_URL['arm']="https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Rootfs/Parrot/armhf/parrot-rootfs-armhf.tar.xz"
TARBALL_SHA256['arm']="fcb3e238dc147b49bca91f39f5ddf8f1646aa47a7c5e31d5cf674bec8694cf80"
- Save and exit the editor.
- Install Parrot OS:
proot-distro install parrot
- Login to Parrot OS:
proot-distro login parrot
Step 6: Limitations of proot-distro on Android
- Performance Constraints: Emulated environments can be slower than native ones.
- File System and Permissions: Some system-level operations might be restricted.
- VNC Experience: VNC is not as smooth as native graphics rendering, so using lightweight desktop environments (like LXDE or XFCE) is recommended.
Potential Projects for Developers and Testers on Proot-Distro
These project ideas have been curated by our team, aimed specifically at those starting their journey in the IT world using proot-distro on Android. Each project is designed to be beginner-friendly and will help you explore the power of Linux right from your device. We’ll be posting detailed tutorials for each of these projects soon, so stay tuned for updates and get ready to dive into some exciting hands-on experiences!
- Python Programming Practice Environment
- Set up a Python development environment to experiment with scripts, build small projects, or learn web scraping and data manipulation. Great for beginners learning programming fundamentals.
- Local Web Server Setup
- Use Apache or Nginx to create a local web server on your Android, perfect for testing websites or web apps. You can even experiment with HTML, CSS, and JavaScript in a real server environment.
- Build and Test SQL Databases
- Install MySQL or PostgreSQL and set up a database for learning SQL. It’s a perfect intro project for those interested in data science or backend development.
- Intro to Ethical Hacking with Parrot OS
- With proot-distro, you can use tools like nmap and Wireshark in a safe, contained environment to get started with ethical hacking basics.
- Linux Shell Scripting Practice
- Dive into shell scripting to automate tasks on your proot-distro environment. This is a powerful skill for those interested in IT, DevOps, or system administration.
- Personal Notes and Wiki Server
- Install DokuWiki or Joplin Server to create a private notes or wiki server. It’s a fun way to keep track of coding lessons, project ideas, or personal knowledge without needing cloud storage.
- Self-Hosted Git Server
- Experiment with Machine Learning Basics (CPU-based)
- Set up a lightweight Python environment to explore machine learning libraries like Scikit-learn or NLTK for natural language processing. While limited to CPU, it’s a solid intro to machine learning.
- Networking Practice with SSH and SFTP
- Learn networking essentials by setting up SSH access to your proot-distro. Experiment with file transfers and remote connections right from Android.
- Desktop Experience on Your Android
- Use a VNC server with a graphical desktop to turn your Android into a mini-Linux PC. You can browse the web, manage files, and even write code in a desktop environment.