TL;DR
- An upcoming Android update will significantly upgrade the Linux Terminal app, enabling it to run full-fledged graphical Linux programs on supported devices.
- The feature is currently experimental, requiring a Pixel 6 or newer on a specific Android Canary build and manual steps to enable both the terminal and hardware acceleration for better performance.
- This guide details how to install and run graphical apps like GIMP or LibreOffice using Flatpak, either by launching them manually or by setting up a complete desktop environment like XFCE.
The Linux Terminal app is set for some major upgrades in an upcoming Android release. If you’re unfamiliar, the Terminal app lets you run full-fledged Linux programs in a virtual machine, opening the door to running many powerful tools that aren’t natively available on Android. Initially, the Terminal app was limited to running command-line applications, but a recent Android update introduced support for graphical apps. Despite some lingering issues, we were surprised by how capable it already is. If you’re interested in trying this out, here’s how to get started.
First of all, you’ll need to have a Pixel 6 or later running the latest 2507 Android Canary release, as this is currently the only public build with support for running graphical Linux apps. While the second quarterly release of Android 16 (QPR2) might introduce this feature more broadly, we won’t know for sure until the public beta arrives.
Because this capability is not in the stable version of Android 16, other devices will have to wait. It’s possible some non-Pixel devices will receive it in the Android 16 QPR2 update, but it’s more likely to arrive as part of next year’s Android 17 release.
To see what’s possible, check out this video of several desktop Linux apps running on a Pixel:
If you have a compatible device and want to replicate this, here are the steps.
How to enable the Linux Terminal in Android
The Linux Terminal isn’t enabled by default in Android. To enable it, follow these steps:
- Open Settings
- Go to System
- Tap Developer options
- Tap Linux development environment
- Toggle (Experimental) Run Linux terminal on Android
Once you do these steps, a “Terminal” icon will be added to the app drawer. Before you open it, read the next section to enable hardware acceleration for better performance.
How to enable hardware acceleration in the Linux Terminal on Android
Enabling hardware acceleration is straightforward. You just need to create an empty file named virglrenderer
inside the /sdcard/linux
directory. This directory likely doesn’t exist yet on your device, so you’ll have to create it manually. If you already have ADB set up, you can do this by running these two commands:
Code
adb shell “mkdir /sdcard/linux”
adb shell “touch /sdcard/linux/virglrenderer”
The Terminal app checks for this file before enabling VirGL, a graphics virtualization technology that translates OpenGL commands from the guest virtual machine to the host. While it doesn’t offer the absolute best performance, Google is working on a more advanced solution for the future.
To confirm it’s working, launch the Terminal app. You should see a toast message at the bottom of the screen that says, “VirGL is enabled.” Once you see that, you’re ready to start installing and running graphical Linux apps.
How to run graphical desktop Linux apps on your Android phone
When you open the Terminal app for the first time, you’ll be prompted to download the necessary files to boot Debian. Tap “Install” and wait for the download to complete. Once you see the command-line console, you’re ready to proceed.
Mishaal Rahman /
First, update your package lists and upgrade any existing packages with these commands:
Code
sudo apt-get update
sudo apt upgrade
Next, install Flatpak, a popular framework for distributing Linux applications, and add its main repository, Flathub:
Code
sudo apt install flatpak
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
Now you can install graphical apps. For example, here’s how to install Chromium, GIMP, and LibreOffice:
Code
sudo flatpak install flathub org.chromium.Chromium
sudo flatpak install flathub org.gimp.GIMP
sudo flatpak install flathub org.libreoffice.LibreOffice
Note that not all Flatpak apps will work. For the best chance of success, look for applications compiled for ARM64 that support the Wayland display protocol.
Launching apps manually
To run these apps, you must first launch a basic graphical environment. This process is a bit involved and is best for quick tests:
- Tap the display icon in the top-right corner of the Terminal app. This forwards graphical output from the Linux VM to your Android screen.
- Connect a physical keyboard. The on-screen keyboard will not appear in this mode.
- Type
weston
and press Enter to start the graphical session. - Once the environment loads, click the terminal icon in the top-left corner to open a Wayland Terminal window.
- In this new terminal, launch your app using its package name. For example, to run GIMP, type:
Code
flatpak run org.gimp.GIMP
Chromium requires a few extra flags to work correctly:
Code
flatpak run org.chromium.Chromium --no-sandbox --enable-features=UseOzonePlatform --ozone-platform=wayland
Launching apps via a desktop environment
Manually launching apps is cumbersome. For a more traditional desktop experience, I recommend installing XFCE:
Code
sudo apt install task-xfce-desktop
The installation will take some time, as it includes many packages. You will be prompted to select your keyboard layout during the process.
Once it’s finished, completely close the Terminal app to ensure the VM shuts down. Re-open it, tap the display icon in the top-right corner, and the XFCE desktop will load automatically. If prompted to log in, use the username root and leave the password blank. This default account can be secured later using standard Linux commands.
That’s it! Your installed Flatpak apps will now appear in the Applications menu in the top-left corner. While other apps should launch directly from the menu, remember that Chromium still requires the special launch flags mentioned in the previous section.
Mishaal Rahman /
For a more convenient way to add new Flatpaks, you can install a tool like Warehouse. And if you notice sluggish performance, you can improve it by allocating more RAM to the VM by following these steps.
Thank you for being part of our community. Read our Comment Policy before posting.