sodcalculator

10 Tech How-To

Install Ubuntu on Android via Linux Deploy

Guide 10-15019 · Updated · Step by step

You can install a full Ubuntu system on an unrooted Android device using the Linux Deploy app, which creates a chroot environment and runs a real Ubuntu userland alongside Android. The process requires no rooting, but it does need a device with sufficient storage and a willingness to work through a few setup steps. This guide walks you through the entire installation, from prerequisites to troubleshooting, so you can get a working Ubuntu shell on your phone or tablet.

What Linux Deploy Does

Linux Deploy is an Android app that installs a Linux distribution (like Ubuntu, Debian, or Kali) into a loopback image file on your device’s storage. It uses a chroot to isolate the Linux environment from Android, meaning it runs as a regular app process rather than replacing your phone’s operating system. This approach is different from a dual-boot setup or a virtual machine—it shares the Android kernel, so you get native performance but limited hardware access.

The app is open-source and has been around for years, with a community that uses it for everything from running a personal web server to learning Linux command-line tools on the go. It supports both ARM and x86 devices, though ARM is far more common in Android phones.

Prerequisites and What You’ll Need

Before you start, make sure your device meets these requirements:

  • Android 4.1 or newer (most modern devices qualify)
  • At least 2 GB of free storage space (more if you plan to install a desktop environment)
  • A working internet connection for downloading packages
  • Sufficient RAM—1 GB minimum, but 2 GB or more is recommended for a smooth experience
  • An unlocked bootloader is not required, but some devices may need it for certain features

You’ll also need to enable “Install from unknown sources” on your device to install the Linux Deploy APK, since it’s not available on the Google Play Store (it was removed years ago, so you’ll need to download it from a trusted source like F-Droid or the developer’s GitHub).

Step-by-Step Installation Guide

  1. Download and install Linux Deploy from a trusted source. The latest version is 2.6.0, but any recent build should work.
  2. Open the app and grant it storage permissions. You’ll see a main screen with a “Properties” section and a “Deploy” button.
  3. Configure the distribution: tap the “Distribution” field and select “Ubuntu” from the list. Choose a release—”focal” (20.04) or “jammy” (22.04) are good choices for stability.
  4. Set the architecture: Linux Deploy usually auto-detects this, but you can manually set it to “arm64” for 64-bit devices or “armhf” for 32-bit ones. If you’re unsure, check your device’s CPU info in Settings > About Phone.
  5. Choose a mirror: The default mirror (ports.ubuntu.com) works for most users, but you can select a faster regional mirror if you know one.
  6. Set the installation path: This is where the Ubuntu image will be stored. Use the default “/storage/emulated/0/linux.img” or specify a custom path on an external SD card if you have one.
  7. Adjust other settings: You can set the image size (default is 2048 MB, which is fine for a basic install), username, password, and whether to enable SSH. For a headless setup, leave “Desktop” unchecked; if you want a GUI, you’ll need to install a VNC server later.
  8. Tap “Deploy” and wait. The app will download the base system and set up the chroot. This can take 10-30 minutes depending on your internet speed and device.

Once the deployment finishes, you’ll see a green “START” button. Tap it to boot into Ubuntu. You can then connect via SSH (using the IP address shown in the app) or open a local terminal using the app’s built-in “Console” feature.

Choosing the Right Ubuntu Release and Desktop

Ubuntu has several releases, and not all are suitable for a phone. Here’s a quick guide:

  • Ubuntu 22.04 LTS (Jammy): The current long-term support release. It’s stable and well-tested, making it a safe choice for most users.
  • Ubuntu 20.04 LTS (Focal): Older but still supported until 2025. Good if you need compatibility with older software.
  • Ubuntu 24.04 LTS (Noble): The newest LTS, but it may not be fully supported by Linux Deploy yet. Use it only if you’re comfortable troubleshooting.

For a desktop environment, you have two main options: install a lightweight window manager like Xfce or LXDE, or use a full desktop like GNOME. GNOME is heavy for a phone, so most users prefer Xfce. To install Xfce, you’ll need to enable the “Desktop” option in Linux Deploy settings and set the “Desktop environment” to “Xfce”. After deployment, you’ll need to install a VNC server (like TightVNC) and connect using a VNC client app.

If you’re just using the command line, you can skip the desktop entirely. SSH access is simpler and more efficient on a phone.

Common Problems and How to Fix Them

Even with a smooth setup, you’ll likely run into a few issues. Here are the most common ones:

  • Deployment fails with “Cannot mount”: This usually means the loopback device isn’t available. Try changing the “Mount options” in the app to “ext4” and ensure your device supports loop devices. Some devices need the “Allow mount” option enabled in the app’s settings.
  • SSH connection refused: Make sure SSH is enabled in the Linux Deploy settings before deployment. After booting, check that the SSH service is running by typing service ssh status in the console. If it’s not, start it with service ssh start.
  • No internet inside Ubuntu: This is often due to DNS issues. Edit /etc/resolv.conf and add nameserver 8.8.8.8 to use Google’s DNS. You may also need to run dhclient to get an IP address.
  • Performance is slow: The chroot shares resources with Android, so heavy apps will be sluggish. Close background Android apps, and consider using a lightweight desktop or no desktop at all.
  • App crashes on start: Make sure you have the latest version of Linux Deploy and that your device has enough free RAM. If it still crashes, try clearing the app’s cache or reinstalling.

Alternatives to Linux Deploy

Linux Deploy isn’t the only way to run Ubuntu on Android. Here are a few alternatives, each with its own trade-offs:

  • Termux: A terminal emulator that runs a Linux environment without root. It’s great for command-line tools but doesn’t give you a full Ubuntu userland—it uses its own package manager and repositories.
  • UserLAnd: An app that runs Linux distributions in a sandboxed environment. It’s easier to set up than Linux Deploy but requires more resources and has a less flexible configuration.
  • Andronix: A tool that installs Linux distributions using Termux, offering a GUI via VNC. It’s user-friendly but not a true chroot—it’s more of a compatibility layer.
  • Dual boot (e.g., Ubuntu Touch): This replaces Android entirely, giving you a full Linux phone. It’s the most powerful option but requires an unlocked bootloader and a supported device.

Linux Deploy stands out because it gives you a genuine Ubuntu system with root access within the chroot, making it ideal for running servers or development tools that need a standard Linux environment.

Safety and Performance Considerations

Running a chrooted Ubuntu on Android is safe for your device, but there are a few things to keep in mind:

  • Storage space: The Ubuntu image can grow over time, so monitor your free space. You can resize the image, but it’s easier to start with a larger size (e.g., 8 GB) if you plan to install many packages.
  • Battery life: Running a Linux environment in the background will drain your battery faster. Close the app when you’re not using it.
  • Security: The chroot is isolated from Android, but it’s not a security boundary. Don’t run untrusted code inside Ubuntu, and keep your Ubuntu packages updated.
  • Kernel compatibility: Because you’re using the Android kernel, some Linux features may not work (e.g., certain kernel modules). This is rarely a problem for general use, but be aware of it.

One common misconception is that Linux Deploy gives you a full desktop experience. In reality, the GUI is delivered via VNC, which has noticeable lag. For most tasks, the command line is far more practical.

Frequently Asked Questions

Do I need root access to use Linux Deploy?

No, root is not required. Linux Deploy works without root by using a loopback image and a chroot, which doesn’t require elevated privileges. However, some advanced features (like mounting external drives) may need root, but the basic installation and use work on unrooted devices.

Can I run a graphical desktop environment?

Yes, you can install a desktop environment like Xfce or LXDE, but you’ll need to enable the “Desktop” option in Linux Deploy settings and install a VNC server. Then, use a VNC client app on your phone to view the desktop. Expect moderate lag, especially on older devices.

Will this affect my Android phone’s performance?

While Ubuntu is running, it uses CPU and RAM, which can slow down Android apps. However, when you stop the chroot (by tapping “STOP” in the app), your phone returns to normal. There’s no permanent impact.

Can I install Ubuntu on any Android device?

Most devices with ARM or ARM64 processors should work. However, devices with very little RAM (less than 1 GB) or storage may struggle. Also, some manufacturers lock down the bootloader, but that doesn’t affect Linux Deploy since it doesn’t require an unlocked bootloader.

Is Linux Deploy legal and safe?

Yes, it’s legal to run Linux on your own device. The app is open-source and widely used. Just be sure to download it from a trusted source to avoid malware. The chroot environment is isolated, so it’s safe for your Android system, but avoid running untrusted scripts inside Ubuntu.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →