Debian Linux on Android – Installation & Desktop Setup

Debian Linux is a popular Linux distribution that can also run on Android devices using the Termux application. It allows you to use Linux commands, install applications, and setup a full desktop environment directly on your phone without root access. You can use it for programming, learning Linux, running desktop apps, and practicing different development or cybersecurity tasks. Here’s what you can do with Debian Linux on Android:

  • Use a full Linux desktop on Android.
  • Install Linux applications and tools.
  • Practice Linux commands and development.
  • Run coding and cybersecurity tools.
  • Learn Linux directly from a mobile device.
  • Use graphical desktop applications.

What is Termux?

Termux is a terminal emulator application for Android that provides a Linux command-line environment. It allows installation of Linux packages, execution of terminal commands, and setup of Linux distributions directly on Android without root access.

Requirements

Before starting the Debian Linux installation process on Android, make sure your device has enough storage space, internet data, and the required applications for completing the desktop setup properly.

  • Android device with Android 7 or above.
  • Latest version of the Termux application.
  • VNC Viewer application for desktop access.
  • Minimum 5GB free storage space.
  • Around 500MB to 800MB internet data.
  • At least 4GB RAM recommended for smoother desktop performance.

Install Debian Linux on Android

Below are the simple steps to install and set up Debian Linux desktop on Android using Termux. Open Termux and run the commands one by one to complete the installation and prepare the desktop environment.

Update Termux packages first:

pkg update && pkg upgrade -y

Install proot-distro package in Termux:

pkg install proot-distro -y

Install Debian Linux distro:

proot-distro install debian

Start Debian Linux environment:

proot-distro login debian

Update Debian packages inside Debian Linux:

apt update && apt upgrade -y

Install XFCE desktop environment and required packages:

apt install xfce4 xfce4-goodies dbus-x11 tightvncserver fonts-noto-color-emoji desktop-file-utils -y

Create VNC directory:

mkdir -p ~/.vnc

Create XFCE startup configuration:

cat > ~/.vnc/xstartup << 'EOF'
#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
startxfce4 &
EOF

Give executable permission to startup file:

chmod +x ~/.vnc/xstartup

Start Debian Desktop

Start VNC server for Debian desktop, run this command inside the Ubuntu:

vncserver

During first startup, it will ask you to create a VNC password for desktop login. You can enter any 6 digit password.

Connect Debian Desktop

  1. Open the VNC Viewer application on your Android device.
  2. Tap on the (+) icon from the bottom right side.
  3. Enter the address: localhost:5901
  4. Enter the Name: Debian Linux
  5. Tap on Create and connect to the server.
  6. Enter the VNC password created during Debian setup.
  7. Debian XFCE desktop environment will open on your Android device.

You can now use Debian Linux desktop on Android and run Linux applications, desktop tools, and terminal commands directly from your mobile device.

Start Debian Again

Open Termux and login to Debian again:

proot-distro login debian

Stop old VNC sessions if already running:

vncserver -kill :1

Remove old VNC lock files:

rm -rf /tmp/.X1-lock /tmp/.X11-unix/X1

Start desktop environment again:

vncserver

Open VNC Viewer and connect using:

localhost:5901

Basic Debian Terminal Commands

Below are some useful basic Debian Linux terminal commands that you can use inside the Debian environment for package management, file handling, and system tasks.

Update Debian packages:

apt update && apt upgrade -y

Install new packages or applications:

apt install package-name

Remove installed packages:

apt remove package-name

List files and folders:

ls

Check current directory location:

pwd

Move into another directory:

cd folder-name

Create a new folder:

mkdir myfolder

Delete a file:

rm filename

Clear the terminal screen:

clear

Exit Debian Linux environment.

exit

End Note

Debian Linux on Android is a simple way to experience a full Linux desktop directly from a mobile device. It helps you learn Linux commands, run desktop applications, practice development tasks, and explore different Linux tools without needing a computer or root access.

SHARE THIS POST: