Turn Your Android Phone into a Linux Server: Step‑by‑Step Guide
This tutorial shows how to repurpose an Android device—either rooted or using Termux—into a functional Linux server by installing Linux Deploy, BusyBox, and Juice SSH, configuring a distro, and connecting via SSH from other devices.
Overview
After losing student discounts, cloud server costs rise, prompting the author to explore turning an Android phone into a Linux machine as a low‑cost alternative. The guide walks through the required hardware, software, and configuration steps.
What You Need
Any Android phone with a usable screen (preferably a discarded device).
Three apps: Linux Deploy (requires root), Juice SSH (terminal client), and BusyBox (adds missing Linux commands).
If you lack a spare phone, a second‑hand Xiaomi 5 (around ¥200) is recommended because it includes NFC for transit cards and is inexpensive.
Root vs. Non‑Root Options
Two approaches exist: a fully‑rooted phone, which offers complete Linux capabilities, and a non‑root method using Termux, which provides a limited Linux environment (e.g., Python works, but many commands are missing).
Rooted phone : Requires wiping data; use only on disposable devices.
Non‑root phone : Install termux from the Play Store; you can run Python but lack many system utilities.
Installing Linux on a Rooted Android Phone
Assuming the phone is already rooted, follow these steps:
Install the three apps shown below.
Open Linux Deploy and configure the distribution. The author uses CentOS 7, but any preferred distro works.
Set the mirror for the chosen distro (example for CentOS 7):
http://chinanet.mirrors.ustc.edu.cn/centos-altarch/Enable SSH in the Linux Deploy settings so you can connect from other devices.
Start the installation. It typically takes about half an hour. When the log shows extra/ssh ... done, the installation succeeded. extra/ssh ... done Connect via SSH using Juice SSH (or from a PC/iPad on the same LAN). Example screenshots of a successful Juice SSH session and an iPad connection are shown below.
Using Termux on a Non‑Root Phone
If the device cannot be rooted, install termux from the Play Store. While many Linux commands are unavailable, you can still run a Python interpreter and perform basic scripting.
Conclusion
By following these steps, you can transform an old Android phone into a functional Linux server, saving money on cloud instances and gaining a portable development environment. The author considers the guide a useful "dry‑run" and invites readers to try it out.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
