The Linux Terminal app is on the verge of a significant transformation with an upcoming Android update, promising to enhance the user experience by allowing full-fledged graphical Linux applications to run on supported devices. This exciting development opens new avenues for users who rely on powerful tools that are typically unavailable on Android. Initially, the Terminal app was confined to command-line applications, but recent updates have paved the way for graphical app support. Early tests have shown promising capabilities, despite some minor issues that remain to be addressed.
To embark on this journey, users will need a Pixel 6 or newer device, paired with the latest 2507 Android Canary release, as this is currently the only public build that supports the execution of graphical Linux apps. While the anticipated second quarterly release of Android 16 (QPR2) may broaden access to this feature, confirmation will only come with the arrival of the public beta. Other devices are left waiting, with the possibility of receiving this capability in the Android 16 QPR2 update, though it is more likely to be part of the forthcoming Android 17 release.
For those eager to explore this feature, a straightforward guide is available to help you get started.
How to enable the Linux Terminal in Android
The Linux Terminal is not activated by default, so users must follow these steps to enable it:
- Open Settings
- Navigate to System
- Select Developer options
- Tap on Linux development environment
- Toggle on (Experimental) Run Linux terminal on Android
Upon completing these steps, a “Terminal” icon will appear in the app drawer. However, before launching it, users should enable hardware acceleration for optimal performance.
How to enable hardware acceleration in the Linux Terminal on Android
Enabling hardware acceleration is a simple process. Users need to create an empty file named virglrenderer
within the /sdcard/linux
directory, which may not exist on your device yet. If you have ADB set up, you can execute the following commands:
adb shell "mkdir /sdcard/linux"
adb shell "touch /sdcard/linux/virglrenderer"
This file is crucial as the Terminal app checks for it before enabling VirGL, a graphics virtualization technology that translates OpenGL commands from the guest virtual machine to the host. Although performance may not be perfect, Google is actively working on improvements. To confirm successful activation, launch the Terminal app and look for a toast message stating, “VirGL is enabled.” With this confirmation, users can proceed to install and run graphical Linux applications.
How to run graphical desktop Linux apps on your Android phone
Upon opening the Terminal app for the first time, users will be prompted to download the necessary files to boot Debian. After tapping “Install” and waiting for the download to finish, the command-line console will be ready for use.
Start by updating your package lists and upgrading existing packages with the following commands:
sudo apt-get update
sudo apt upgrade
Next, install Flatpak, a widely-used framework for distributing Linux applications, and add its main repository, Flathub:
sudo apt install flatpak
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
Now, users can install graphical applications. For instance, to install Chromium, GIMP, and LibreOffice, execute the following commands:
sudo flatpak install flathub org.chromium.Chromium
sudo flatpak install flathub org.gimp.GIMP
sudo flatpak install flathub org.libreoffice.LibreOffice
It’s important to note that not all Flatpak apps will function seamlessly. To maximize compatibility, users should seek applications compiled for ARM64 that support the Wayland display protocol.
Launching apps manually
To run these applications, users must first initiate a basic graphical environment, which can be somewhat intricate but is suitable for quick tests:
- Tap the display icon in the top-right corner of the Terminal app to forward graphical output from the Linux VM to the Android screen.
- Connect a physical keyboard, as the on-screen keyboard will not be available 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:
flatpak run org.gimp.GIMP
For Chromium, additional flags are required for proper functionality:
flatpak run org.chromium.Chromium --no-sandbox --enable-features=UseOzonePlatform --ozone-platform=wayland
Launching apps via a desktop environment
For a more traditional desktop experience, it is advisable to install XFCE, which simplifies the app launching process:
sudo apt install task-xfce-desktop
This installation may take some time as it encompasses numerous packages. During the process, users will be prompted to select their keyboard layout. Once completed, close the Terminal app completely to ensure the VM shuts down, then reopen 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.
Now, the installed Flatpak apps will be accessible from the Applications menu in the top-left corner. While most applications should launch directly from the menu, remember that Chromium still requires the special launch flags mentioned earlier.