Ubuntu Setup
Ubuntu is the foundation of your ADL desktop environment. In this guide, you will install a full Ubuntu userspace on your Android device using proot-distro, a lightweight tool that runs Linux distributions without root access or device modifications.
If you are unfamiliar with Ubuntu or proot, you can read more about them in our concept guides:
- What is Ubuntu? --- an overview of the Ubuntu distribution and why it is well-suited for ADL.
- What is proot? --- how proot-distro creates a Linux environment on Android without root.
Why Ubuntu?โ
Ubuntu is the most widely supported Linux distribution. The vast majority of tutorials, packages, and community answers you find online assume Ubuntu, which means troubleshooting is straightforward. The apt package manager gives you access to tens of thousands of pre-built packages, so you can install desktop environments, development tools, and applications with a single command.
proot-distro handles the heavy lifting: it downloads an official Ubuntu rootfs, configures it for use inside Termux, and provides a login command that drops you into a fully functional Ubuntu shell. No rooting, no custom kernels, no risk of bricking your device.
Step 1: Install Ubuntuโ
Run the following command inside Termux to download and install the Ubuntu distribution:
proot-distro install ubuntuThis will download the Ubuntu rootfs archive and extract it into proot-distro's managed directory. The download size is typically around 30--50 MB, but the extracted filesystem will use approximately 200--400 MB of storage.
You should see download progress followed by extraction output. The final line will confirm that the distribution has been installed, similar to:
Distribution ubuntu was successfully installed.
The installation only needs to be done once. After it completes, the Ubuntu filesystem persists across Termux sessions. You can remove it later with proot-distro remove ubuntu if you ever need to start fresh.
Step 2: First Loginโ
Log in to your newly installed Ubuntu environment:
proot-distro login ubuntuYour shell prompt will change from the Termux prompt to something like:
root@localhost:~#
This indicates you are now inside the Ubuntu environment, logged in as the root user. The hostname localhost is the default.
Notice the prompt change. You were previously in Termux (which runs a minimal Android-native Linux environment). Now you are inside a full Ubuntu userspace. Commands you run from this point forward execute within Ubuntu, with access to Ubuntu's package manager and filesystem layout.
To return to Termux at any time, type exit or press Ctrl+D. Your Ubuntu installation remains intact and you can log back in with proot-distro login ubuntu whenever you want.
Step 3: System Updateโ
Before installing anything, update the package lists and upgrade any pre-installed packages to their latest versions:
apt update && apt upgrade -yThe apt update command refreshes the list of available packages from Ubuntu's repositories. The apt upgrade -y command installs newer versions of any packages that are already present. The -y flag automatically confirms the upgrade so you do not have to type "yes" for each package.
You will see output showing package lists being fetched from Ubuntu archive mirrors, followed by a list of packages being upgraded (if any). It ends with something like:
Reading package lists... Done
Building dependency tree... Done
X upgraded, Y newly installed, 0 to remove and 0 not upgraded.
Run apt update && apt upgrade -y regularly --- at least once a week, or whenever you install new software. Keeping your system updated ensures you have the latest security patches and bug fixes. Outdated packages can cause compatibility issues with newly installed software.
Step 4: Install Essential Packagesโ
Install the core utilities that you will need throughout the rest of the ADL setup:
apt install sudo nano wget curl git -yHere is what each package provides:
| Package | Purpose |
|---|---|
| sudo | Run commands with elevated privileges. Required if you create a non-root user account later. |
| nano | A simple, beginner-friendly text editor for editing configuration files from the terminal. |
| wget | Download files from the internet via the command line. Used by many installation scripts. |
| curl | Transfer data to and from servers. Similar to wget but also supports uploading and API requests. |
| git | Version control system. Essential for cloning repositories, including ADL itself. |
The output will show each package being downloaded and installed. It concludes with a summary of how many packages were installed:
Setting up git (1:2.xx.x-xubuntuX) ...
Setting up sudo (1.x.xxpX-xubuntuX) ...
No errors should appear.
Some of these packages may already be present in the base Ubuntu image. apt install will simply skip anything that is already installed at the latest version.
Step 5: Create a User Account (Optional)โ
By default, proot-distro logs you in as root. For single-user setups, this is perfectly fine and simplifies the workflow. However, if you plan to share the environment with others or want to follow Linux security best practices, creating a dedicated user account is recommended.
Why use a non-root user?โ
Running as root means every command has unrestricted access to the entire system. A mistyped rm command could delete critical files. A non-root user provides a safety net: destructive operations require an explicit sudo prefix, giving you a moment to reconsider.
Create the userโ
Replace yourname with your preferred username:
adduser yournameYou will be prompted to set a password and fill in optional user information (full name, room number, etc.). You can press Enter to skip the optional fields. The output ends with:
Is the information correct? [Y/n]
Type Y and press Enter.
Grant sudo privilegesโ
Add the new user to the sudo group so they can run administrative commands:
usermod -aG sudo yournameSwitch to the new userโ
su - yournameYour prompt changes to reflect the new username:
yourname@localhost:~$
Notice the $ instead of # --- this indicates a normal user rather than root.
To log in directly as your new user in future sessions, use:
proot-distro login ubuntu --user yourname
Step 6: Configure Localeโ
Locale settings control the language, character encoding, and formatting conventions used by your system. Configuring the locale correctly prevents character rendering issues in terminal applications and desktop environments.
Install the locales packageโ
apt install locales -yGenerate your localeโ
For most users, the en_US.UTF-8 locale is the best choice. It provides full Unicode support, which means international characters, emoji, and special symbols will all display correctly.
sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-genYou should see output confirming that the locale was generated:
Generating locales (this might take a while)...
en_US.UTF-8... done
Generation complete.
Set the locale as defaultโ
echo 'LANG=en_US.UTF-8' > /etc/default/localeIf you need a different locale (for example, de_DE.UTF-8 for German or ja_JP.UTF-8 for Japanese), replace en_US.UTF-8 in the commands above with your preferred locale. You can view all available locales by running cat /etc/locale.gen | grep -v '#'.
If you skip this step, you may encounter garbled text, missing characters, or outright crashes when you install a desktop environment in the next guide. Always configure your locale before proceeding.
Verificationโ
Before moving on, verify that your Ubuntu environment is configured correctly by running these checks.
Check Ubuntu versionโ
cat /etc/os-release | grep -E 'PRETTY_NAME|VERSION'Output showing Ubuntu version information, for example:
PRETTY_NAME="Ubuntu 24.04.x LTS"
VERSION="24.04.x LTS (Noble Numbat)"
VERSION_ID="24.04"
VERSION_CODENAME=noble
Check installed packagesโ
which sudo nano wget curl gitEach tool should return a path, confirming it is installed:
/usr/bin/sudo
/usr/bin/nano
/usr/bin/wget
/usr/bin/curl
/usr/bin/git
Check localeโ
localeThe output should show en_US.UTF-8 (or your chosen locale) for the LANG variable:
LANG=en_US.UTF-8
Check network connectivityโ
curl -s -o /dev/null -w '%{http_code}' https://archive.ubuntu.comThe output should be 200, indicating that your Ubuntu environment can reach the Ubuntu package archives. If you see a different code, check your device's internet connection.
Troubleshootingโ
Next Stepโ
Your Ubuntu environment is installed and ready. In the next guide, you will install a desktop environment and configure a VNC server so you can interact with Ubuntu through a graphical interface.