How to install Ubuntu Linux on Android without root

Are you looking for a way to install and run Ubuntu 18.04 Linux server on your Android Smartphone or tablet without rooting the phone? Then try UserLAnd.

Android, being a very popular operating system users are keep looking for a way to easily install different Linux distros on it. Hitherto, it was very tedious work to run Linux OS on Android but not anymore. With the help of UserLand, we can install Kali, Ubuntu, Arch Linux, Debian distros on Android in a minimal form. It provides built-in Shell and VNC sessions for a graphical experience. UserLand was developed by the team of GNURoot Debian App which was very popular before, as a replacement.

Here we will show the way to install and run Ubuntu 18.04 minimal server on an Android phone without any kind of rooting process. It helps you to learn Linux directly on your phone without voiding the warranty.

Note: The below-given steps also work for Debian and Kali Linux available in UserLAnd App.

Install Ubuntu Linux on android without root

Step 1: Download UserLAnd App

This app is available on the Google Play Store, here is the link to download it. There are no complications in its installation just like any other, open the Play store on phone either use the here given link or search for UserLAnd and when appears, tap to install it.

Step 2: Run UserLAnd to install Linux OS on Android

The moment, the app opens, you will see multiple Linux distros options along with their logos such as KALI Linux, Ubuntu, Alpine, Arch Linux, Debian along with lightweight Debian based Desktops with Xfce and Lxde desktop environment. It also has some Linux development, games, and productivity apps.  Well! here we are only about to focus on the process to run Ubuntu on Android.  Tap on the Ubuntu icon.

Run Ubuntu Linux on Android using Userland

Step 3: Setup Username and Password for user and VNC

When you tap on the Ubuntu or any other Linux distros have given in UserLAnd, the first it will ask you to set up a username, password, and VNC password.

Type whatever you want and remember this will set you as a standard user of your Android’s Ubuntu operating system. Once done, tap on the Continue option.

Create username and password for Ubuntu on Android

 

Step 4: Download Ubuntu for Android

The next thing which we need to select that how we would like to connect installed Linux OS Ubuntu on Android with SSH or VNC. I would like to use SSh which is simple and from the inbuilt terminal of UserLAnd, I can easily control my Linux operating system. We will also show later in this article how to use RealVNC to connect the existing Ubuntu, KALI, or any other OS available on this Android application.

After that, it will say the files of Ubuntu to download on Android are 80MB and would like to download it without Wifi, tap continue if you want to download them on mobile data. It will take a few minutes to set up all depend upon your internet connection speed.

ubuntu for android download

 

Step 5: Log in to Android running Ubuntu

After the installation, as we have selected the SSH in the beginning, a terminal window will open. Now here just like a regular Ubuntu server enter the password you have created above for your Ubuntu image running on Android.

Login to Android Ubuntu

 

Step 6: Update and Upgrade  Ubuntu running on Android

Apart from the small screen and no init boot it is just like Windows 10 WSL, you will not feel any other differences on this Ubuntu Linux image, emulated on an Android phone.

Thus, now we can use the keyboard to enter the command to our Linux. Let’s first update and upgrade all the packages of it. Run the following command

sudo apt-get update
sudo apt-get upgrade

Update and upgrade ubuntu running on Android

 

Step 7: Set the root password for Ubuntu

As we know by default there is no password for the root user, so to set that use the following command:

sudo passwd root

Enter Unix Password two times that you want to set and it will be done…

 

Step 8: Install Linux Desktop Environment LXDE

By default, the OS will have only a command-line interface and to give it some Graphical user interface, we need to install it manually. Here we are installing lightweight LXDE for Ubuntu Linux to run GUI on Android phones.

sudo apt-get install lxde -y

 

Step 9: Setup VNC to access Ubuntu via GUI interface

Note: Running Linux GUI for Ubuntu on Android is not recommended unless you have a high-end smartphone because it is laggy and also crashes sometimes.

Well! still for the sake of the tutorial I am telling you how to access and view installed LXDE Desktop on Ubuntu on Android.

On UserLAnd Ubuntu command-line shell execute the following commands:

We can use the XSDL Android app to access the GUI desktop for Ubuntu but that is laggy and that’s why decided not to use it, instead RealVNC viewer.

sudo apt install tigervnc-standalone-server -y

Set login password:

vncpasswd

Start VNC Server

vncserver -geometry 800x600 -depth 24

If you are using a Tablet or big-screen phone then can increase the resolution to 1920×1080

Note: I am installing it on OnePlus5 and it has Full HD resolution and in the above command use your resolution.

 

Step 10: Install the RealVNC Android App

In the above step, we already have set up the Linux VNC server on Ubuntu and now it’s time to download the Android app here called RealVNC Viewer- Remote Desktop.

Step 11: Connect VNC to Ubuntu LXDE Desktop

On the VNC viewer tap on the + icon to create a new connection. Enter 127.0.0.1:5901 and the Name of your installed OS, in my case it was raj. Then tap on the Create option.

As our connection is not encrypted it will warn that; here ignore this and simply tap on OK.

Now in Authentication enter the password that you have created while installing the TightVNC server above.

Connect VNC remote desktop

Finally, you will see the LXDE Linux Desktop environment on Android for Ubuntu which further installed the UserLAnd app on Android.

LXDE screenshot on Android Ubuntu LXDE on Smartphone

If you want to kill or stop the vncservice then use the below command:

vncserver -kill :*

In this way, we can use this app to have Ubuntu for fun and experiment with Linux on an Android phone or tablet.

 

27 thoughts on “How to install Ubuntu Linux on Android without root”

  1. Hi
    I am using MI A2 mobile,
    when am trying to use this cmd
    sudo vncserver :1 -geometry 1080*2160

    Getting error : vncserver: geometry 1080*2160 is Invalid

    Resolution 1080 x 2160 pixels

    Please do the needful

    Reply
    • Try this command:

      sudo vncserver :1 -geometry 1920×1080

      Maybe the 1080*2160 resolution would not be supported.

      Reply
  2. Thanks very much for the article. When this is fully installed can I use a bluetooth mouse with LXDE desktop?

    Reply
    • Hello Jim, we can
      we comment on that because we didn’t try Bluetooth keyboard or mouse, however, go ahead and do it, perhaps it works and in case it did, let us know too.

      Reply
      • I have going through all the steps to install but when i try to connect the vnc app it give the error message of “this computer’s domain name could be resolved” help!

        Reply
    • It’s missing a . Between the 0 and 1 only reason I found out is by the picture he posted

      Reply
  3. Had to give up after 2 days. Userland sorts out terminal and Ubuntu but cannot get a desktop to work, terminal only. Any advice would be much appreciated.
    I’m using a Huawei P30 pro with latest updates.
    Regards.

    Reply
  4. I wont to get rid of android all together and run either ubuntu or ubuntustudio on my rockchip_3288 android box that has 64gb and 4gb of ram… can this be done, even better if I can run windows 7 or up

    Reply
  5. hai.. i cant connect to vnc apps.. how can i fix this..? the computers domain name could not be resolved.. thank you

    Reply
  6. Mengapa ketika saya menjalankan startlxde

    $ ** Message: 17:13:56.846: main.vala:102: Session is LXDE
    ** Message: 17:13:56.849: main.vala:103: DE is LXDE

    (lxsession:15557): Gtk-WARNING **: 17:13:56.870: cannot open display

    Reply
  7. My question is… how can I install other applications like pycharm in my Ubuntu after setting up UserLAnd on my Android phone

    Reply
  8. when I type the command ‘ apt-get install vcnserver ‘ . It says vnc candidate has no installation package . I followed just as it was mentioned in the article but I am stuck . Please help

    Reply
  9. I install the vnc server – twice. It does not request a password. I do not get the windows shown. I get no errors.
    Worse RealVNC Viewer has NO support and I get the *computer domain name not resolved” error. Many are complaining about it. Come on Raj. Please help us Newbees out.

    Reply
  10. still havingissues of doamin name. i used ubuntu as well as ubuntu lxde as thats whatis installed.

    Reply
  11. Hi I’ve actually installed Ubuntu on my Tecno pop 2 but I’ve been trying to type in my password but I can’t pls is tgere any solution to this problem

    Reply
  12. Type in your password and press enter…. it will ask you to type it in again. Just doesn’t show characters when you’re typing in the password.

    Reply
  13. How i can solve the problem
    …..
    userland@localhost:~$ sudo apt install tigervnc-standalone-server tigervnc-xorg-extension tigervnc-viewer
    Reading package lists… Done Building dependency tree
    Reading state information… Done
    tigervnc-standalone-server is already the newest version (1.10.1+dfsg-3).
    The following additional packages will be installed: libfltk-images1.3 libfltk1.3
    The following NEW packages will be installed: libfltk-images1.3 libfltk1.3 tigervnc-viewer tigervnc-xorg-extension
    0 upgraded, 4 newly installed, 0 to remove and 52 not upgraded.
    9 not fully installed or removed. Need to get 867 kB of archives.
    After this operation, 2105 kB of additional disk space will be used.
    Do you want to continue? [Y/n] y Get:1 http://ports.ubuntu.com/ubuntu-ports focal/universe armhf libfltk1.3 armhf 1.3.4-10build1 [484 kB]
    Get:2 http://ports.ubuntu.com/ubuntu-ports focal/universe armhf libfltk-images1.3 armhf 1.3.4-10build1 [23.5 kB]
    Get:3 http://ports.ubuntu.com/ubuntu-ports focal/universe armhf tigervnc-viewer armhf 1.10.1+dfsg-3 [175 kB]
    Get:4 http://ports.ubuntu.com/ubuntu-ports focal/universe armhf tigervnc-xorg-extension armhf 1.10.1+dfsg-3 [184 kB]
    Fetched 867 kB in 1s (796 kB/s)
    debconf: delaying package configuration, since apt-utils is not installed
    Selecting previously unselected package libfltk1.3:armhf. (Reading database … 72981 files and directories currently installed.)
    Preparing to unpack …/libfltk1.3_1.3.4-10build1_armhf.deb …
    Unpacking libfltk1.3:armhf (1.3.4-10build1) … Selecting previously unselected package libfltk-images1.3:armhf.
    Preparing to unpack …/libfltk-images1.3_1.3.4-10build1_armhf.deb …
    Unpacking libfltk-images1.3:armhf (1.3.4-10build1) … Selecting previously unselected package tigervnc-viewer.
    Preparing to unpack …/tigervnc-viewer_1.10.1+dfsg-3_armhf.deb … Unpacking tigervnc-viewer (1.10.1+dfsg-3) …
    Selecting previously unselected package tigervnc-xorg-extension.
    Preparing to unpack …/tigervnc-xorg-extension_1.10.1+dfsg-3_armhf.deb …
    Unpacking tigervnc-xorg-extension (1.10.1+dfsg-3) …
    Setting up udisks2 (2.8.4-1ubuntu2) … Failed to scan devices: Permission denied
    dpkg: error processing package udisks2 (–configure): installed udisks2 package post-installation script subprocess returned error exit status 1
    Setting up libfltk1.3:armhf (1.3.4-10build1) …
    Setting up libfltk-images1.3:armhf (1.3.4-10build1) … dpkg: dependency problems prevent configuration of gvfs-daemons:
    gvfs-daemons depends on udisks2; however: Package udisks2 is not configured yet.
    dpkg: error processing package gvfs-daemons (–configure):
    dependency problems – leaving unconfigured dpkg: dependency problems prevent configuration of gvfs-backends:
    gvfs-backends depends on gvfs-daemons (= 1.44.1-1ubuntu1.1); however: Package gvfs-daemons is not configured yet.

    dpkg: error processing package gvfs-backends (–configure):
    dependency problems – leaving unconfigured
    No apport report written because the error message indicates its a followup error from a previous failure.
    No apport report written because the error message indicates its a followup error from a previous failure. Setting up tigervnc-viewer (1.10.1+dfsg-3) … update-alternatives: using /usr/bin/xtigervncviewer to provide /usr/bin/vncviewer (vncviewer) in auto mode
    update-alternatives: warning: skip creation of /usr/share/man/man1/vncviewer.1.gz because associated file /usr/share/man/man1/xtigervncviewer.1.gz (of link group vncviewer) doesn’t exist
    update-alternatives: warning: skip creation of /usr/share/man/man1/xvncviewer.1.gz because associated file /usr/share/man/man1/xtigervncviewer.1.gz (of link group vncviewer) doesn’t exist
    No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of gnome-disk-utility:
    gnome-disk-utility depends on udisks2 (>= 2.7.6); however:
    Package udisks2 is not configured yet.
    dpkg: error processing package gnome-disk-utility (–configure): dependency problems – leaving unconfigured
    Setting up libfprint-2-2:armhf (1:1.90.2+tod1-0ubuntu1~20.04.8) … Failed to scan devices: Permission denied
    No apport report written because MaxReports is reached already dpkg: error processing package libfprint-2-2:armhf (–configure): installed libfprint-2-2:armhf package post-installation script subprocess returned error exit status 1
    Setting up tigervnc-xorg-extension (1.10.1+dfsg-3) … dpkg: dependency problems prevent configuration of gvfs:armhf:
    gvfs:armhf depends on gvfs-daemons (<= 1.44.1-1ubuntu1.1); however: Package gvfs-daemons is not configured yet.

    dpkg: error processing package gvfs:armhf (–configure):
    dependency problems – leaving unconfigured
    No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already
    dpkg: dependency problems prevent configuration of fprintd:
    fprintd depends on libfprint-2-2 (>= 1:1.90.1); however:
    Package libfprint-2-2:armhf is not configured yet.

    dpkg: error processing package fprintd (–configure): dependency problems – leaving unconfigured
    dpkg: dependency problems prevent configuration of gvfs-fuse:
    gvfs-fuse depends on gvfs (= 1.44.1-1ubuntu1.1); however:
    Package gvfs:armhf is not configured yet.

    dpkg: error processing package gvfs-fuse (–configure): dependency problems – leaving unconfigured
    dpkg: dependency problems prevent configuration of libpam-fprintd:armhf:
    libpam-fprintd:armhf depends on fprintd (= 1.90.9-1~ubuntu20.04.1); however:
    Package fprintd is not configured yet.
    dpkg: error processing package libpam-fprintd:armhf (–configure): dependency problems – leaving unconfigured
    No apport report written because MaxReports is reached already
    No apport report written because MaxReports is reached already
    Processing triggers for mime-support (3.64ubuntu1) … Processing triggers for hicolor-icon-theme (0.17-2) …
    Processing triggers for gnome-menus (3.36.0-1ubuntu1) …
    Processing triggers for libc-bin (2.31-0ubuntu9.2) … Processing triggers for man-db (2.9.1-1) …
    Processing triggers for desktop-file-utils (0.24-1ubuntu3) … Errors were encountered while processing:
    udisks2 gvfs-daemons
    gvfs-backends
    gnome-disk-utility libfprint-2-2:armhf
    gvfs:armhf
    fprintd
    gvfs-fuse
    libpam-fprintd:armhf E: Sub-process /usr/bin/dpkg returned an error code (1)

    Reply
  14. still having issues of the domain name. I used ubuntu as well as ubuntu lxde as that’s what is installed.
    How can I set or settled password because i can not previous password

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.