Ubuntu is a popular Linux distribution that can also be run inside Termux on Android. It gives you a Linux environment where you can install packages, run Linux commands, use programming tools, and practice Linux skills. You can easily install Ubuntu in Termux and use it to run commands and explore different tools on your Android device.
Features of Ubuntu in Termux:
- Run Ubuntu Linux on your Android device.
- Use common Linux terminal commands.
- Install Ubuntu packages with APT.
- Create, edit, copy, move, and delete files.
- Install programming languages and development tools.
- Run Python, Git, and other Linux applications.
- Practice Linux commands and administration.
- Create a Linux environment for learning and testing.
Ubuntu Installation Commands
Below are the simple commands to install Ubuntu in Termux. Run each command one by one and wait for the installation to complete.
First, update the Termux packages.
pkg update && pkg upgrade -y
Install the required package.
pkg install proot-distro -y
Check the available Linux distributions.
proot-distro install --help
Install Ubuntu.
proot-distro install ubuntu
The installation may take some time depending on your internet connection and device.
After the installation finishes, start Ubuntu.
proot-distro login ubuntu
You are now inside the Ubuntu environment
root@localhost:~#.
Check the Ubuntu version.
cat /etc/os-release
You can also check the system architecture with:
uname -m
Ubuntu Usage Commands
Once you are inside the Ubuntu shell, you will see the root@localhost:~# prompt. You can now use the following Linux commands to manage files, install packages, and check system information.
Update the Ubuntu package list.
apt update
Upgrade installed packages.
apt upgrade -y
Install a package.
apt install package-name
For example, install Python:
apt install python3 -y
Check the current directory.
pwd
List files and folders.
ls
Show detailed file information.
ls -la
Create a new directory.
mkdir myfolder
Enter a directory.
cd myfolder
Go back to the previous directory.
cd ..
Create a new file.
touch example.txt
Display a file.
cat example.txt
Copy a file.
cp example.txt backup.txt
Move or rename a file.
mv example.txt newfile.txt
Remove a file.
rm newfile.txt
Remove an empty directory.
rmdir myfolder
Check the current user.
whoami
Check running processes.
ps
Check available disk space.
df -h
Check memory usage.
free -h
Check the IP configuration.
ip addr
You can install Git inside Ubuntu with:
apt install git -yCheck the Git version.
git --version
You can also install useful development packages such as Python, GCC, and Nano:
apt install python3 gcc nano -y
Run Python:
python3
To leave the Python interpreter, use:
exit()
When you finish using Ubuntu, exit the Ubuntu environment with:
exit
You will return to the normal Termux terminal.
To enter Ubuntu again later, simply run:
proot-distro login ubuntu
If you want to completely remove the Ubuntu installation, first exit Ubuntu and run this command from Termux shell:
proot-distro remove ubuntu
You can use these commands to explore Ubuntu, install the tools you need, and practice different Linux tasks in Termux.
Ubuntu Overview
Ubuntu is one of the most popular Linux distributions and is known for its simple and easy-to-use environment. Running Ubuntu in Termux lets you explore a Linux shell, install packages, manage files, and use different Linux tools on your Android device.



