How To Install Ubuntu In Termux (CLI & GUI ) Without Root

You may have read so many articles or watched videos about installing ubuntu in android device with the help of termux application. If you still can’t find a clear way to install both CLI ( Command Line Interface) and GUI ( Graphical User Interface) version of Ubuntu in your android device, then this article is for you. In this article, I’ll tell you step-by-step guide on how to install ubuntu in termux without root.

How to install ubuntu in termux
Ubuntu In Termux




How To Install Ubuntu In Termux

This article is divided into 2 parts, one is for installing CLI version of Ubuntu in Termux and the other one is for installing GUI version of Ubuntu in Termux. If you want to install CLI then copy paste all the commands from CLI version of Ubuntu and same goes for GUI version of Ubuntu.

How To Install Ubuntu in Termux (CLI Version)

Installing CLI version of Ubuntu is very simple. Just launch your Termux application and then copy paste all the commands mentioned below.




  • Update the list of packages.
apt update

We’ll be using proot-distro package to install Ubuntu in Termux. proot-distro package is used for installing and managing linux distributions in Termux. Not only Ubuntu, you can install other linux distributions too with the help of proot-distro package.

  • Install proot-distro package.
apt install proot-distro
  • After you’ve successfully installed proot-distro package, type proot-distro list to get the list of available linux distributions to install.
proot-distro list
  • You’ll see the list of all available linux distros to install. There will be the name of distro, alias and status.
  • To install any distro from the list type proot-distro install and then alias of the distro you want to install. So we are going to install Ubuntu and the alias of Ubuntu is ubuntu. So, the command to install Ubuntu will be proot-distro install ubuntu.
proot-distro install ubuntu

Above command will download and automatically install the CLI version of ubuntu in termux. It can take 2-3 minutes to complete this process.

  • After Ubuntu is installed, type proot-distro login ubuntu to launch ubuntu system in your termux application.
proot-distro login ubuntu
how to insall ubuntu in termux - proot-distro login ubuntu
proot-distro login ubuntu




This is how you can install CLI version of Ubuntu in Termux without root. Note that this CLI version of ubuntu does not contain any pre-installed packages out of the box. That is the reason, the size of CLI version is approx 100mb only. While we can make this CLI version of Ubuntu to also support GUI, but it will require so many commands and tweaks, to avoid that I’ve explained the simplest way to install GUI version of Ubuntu in termux.

What is OnlyFans?

Launch Ubuntu in termux with Ubuntu command

According to me using proot-distro login ubuntu command to launch Ubuntu everytime is not convenient because it’s too long. So like me, if you want to launch your ubuntu just by typing ubuntu in your termux, copy-paste the commands given below.


 echo "proot-distro login ubuntu" > $PREFIX/bin/ubuntu

 chmod +x $PREFIX/bin/ubuntu

After you copy-paste the commands mentioned above, you’ll be able to launch your Ubuntu distro by just typing ubuntu in your Termux.

how to install ubuntu in termux - bonus
CLI Ubuntu In Termux




How To Install Ubuntu in Termux (GUI Version)

As I told you earlier, we can make our CLI version of Ubuntu to support GUI too, by installing some packages like xfec4. But it won’t be as good looking as the GUI version of Ubuntu that we are going to install. We’ll download and install Ubuntu 21.04 by RandomCodeOrg from GitHub. This ubuntu comes with everything pre-installed and looks like the Desktop version of Ubuntu.

So to install GUI version of Ubuntu in your Termux, copy-paste the commands given below in your Termux terminal.

  • Update the list of packages
apt update
  • Clone the ubuntu on android repository from github.
git clone https://github.com/RandomCoderOrg/ubuntu-on-android
  • Get inside the cloned repository.
cd ubuntu-on-android
  • Run install.sh file using bash install.sh command.
bash install.sh

This will download and setup everything required to install Ubuntu in Termux




  • After the above mentioned script is finished setting up everything, type udroid --install to install Ubuntu in Termux.
udroid --install

This will download and set up the version of Ubuntu that supports both GUI and CLI. It also comes with a pre-installed VS Code and Sublime Text Editor out of the box. The command given above will download ubuntu of 1.8 GB, so make sure you have good internet connectivity and at least 8GB of free space.

  • After ubuntu is downloaded and automatically installed, type the command below to launch ubuntu.
undorid -l xfce4
Setting Up VNC server
  • Type vncserver in your ubuntu system to start VNC server on localhost:1
vncserver
  • Open VNC viewer and click on plus button to setup new connection.
Setting Up VNC Connection To Run Ubuntu in Termux
VNC Connection




  • In address section type localhost:1 and in name section type Ubuntu. Anyway, you can name it anything you want.
Setup VNC Address - GUI Ubuntu in Termux
Setup VNC Address
  • After that click on create.
  • You’ll see message saved connection. Now click on connect to use the GUI version of your Ubuntu.
  • If you’ll be asked for password, type secret as password.
VNC Password For Ubuntu In Termux
VNC Password
  • After a successful connection, you’ll see the GUI version of your Ubuntu in your VNC Viewer.
how to install ubuntu in termux without root
GUI Ubuntu In Termux




So this is how you can install and use ubuntu in termux. If you wish to close it, very first switchback to termux and type vncserver -kill :1 to stop the VNC server.

How To Run VS Code On Android

Some Useful Commands Of Udroid Ubuntu
Command Usage
udroid --install Download and install ubuntu.
udroid -l xfce4 Launch Ubuntu.
udroid --isolated Run isolated environment without access to host file system.
vncserver Start VNC server.
vncserver -kill :<display_number> Stop running VNC server on specified display number.
udroid --termux-home Mount termux directory to /root.
udroid --help Show help information
Useful Commands For Udroid Ubuntu




Important Things To Note
  • Make sure you have good internet connection available while installing ubuntu, cause while installing GUI you’ll need a lot of internet.
  • If you plan to install GUI version, you need at least 8 GB of space for it.
  • While using GUI version of Ubuntu, if it feels laggy then click on Applications > Settings > Display and decrease your resolution to reduce lag.
  • Make sure you have powerfull device, cause even after reducing resolution you may experience lag if your device is not that much powerful.
  • I recommend you to install and use CLI version of Ubuntu instead of GUI version.




Conclusion

So this is how you can install and use Ubuntu in Termux. If you got stuck somewhere make sure to watch the Youtube video given below about installing Ubuntu in Termux.

YouTube player
guest
1
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
trackback
10 months ago

[…] How To Install Ubuntu In Termux Without Root […]

1
0
Would love your thoughts, please comment.x
()
x