Table of Contents
Today, in this article we will show you how to Connect Linux system with Android phone. Given that Android makes extensive use of the Linux kernel, Linux and Android users who have attempted to connect the two operating systems together have likely experienced frustration. These two should get along well right away. Not at all. Fortunately, the KDE Community has put a lot of effort into making this happen by way of a GNOME Shell extension and an Android app.
The Linux kernel, a software stack that communicates with hardware in a device, serves as the foundation for Android. In essence, it enables communication between an operating system and the hardware, whether that hardware is a PC, a smartphone, or another piece of gear. The correct name for the Linux operating system is GNU/Linux. However, the term “Linux” has become a catch-all term for both the kernel and the many operating systems throughout time.
A few of these are Gentoo, Arch Linux, and Ubuntu. Despite using the Linux kernel, Android does not provide a desktop environment. When thinking about how to install Linux for Android, most users first contemplate this. You know the difficulty of not being able to connect Android with Linux, especially since Android heavily relies on the Linux kernel. These two should naturally be able to communicate with one another. We mentioned below are the steps to connect Linux system with Android phone.
Steps to connect Linux system with Android phone
Installing necessary packages
Keep in mind that you are simply running Linux on Android with some free applications; Android is not being replaced on your smartphone. All of them are accessible through the Play Store. The first programme is called Andronix, and it enables you to write a straightforward script that will launch the automatic download and installation of the Linux distribution of your choosing.
The second programme is referred to as Termux. Additionally, it is available in the F-Droid Store. You can use it as a terminal emulator to run Linux command line apps on your smartphone. Termux has a variety of applications, and we can discuss those in more detail in a separate featured post.
Distribution Selection
The entire procedure starts with us opening Andronix. A list of distributions will be offered to you for selection. Ubuntu, Fedora, Manjaro, Arch, and Debian are the most widely used. Even though Alpine is the smallest of them, it takes a lot of tweaking to feel cosy. Pick Ubuntu if this is your first time using Linux. When you click the Install button, a version selection screen will appear. You have a choice between 18.04 or 20.04. 2018 saw the release of 18.04, while 2020 saw the arrival of 20.04. The distribution installation commands are then copied by Andronix to the clipboard.
Starting installation
After that, open Termux and paste the text by pressing and holding the command prompt’s screen. Press Enter on the keyboard to begin. The installation procedure entails downloading a number of scripts and packages as well as setting up your phone’s operating system. Make sure you have a quick internet connection and that your disc space is sufficient.
The script has the ability to download a substantial quantity of data, depending on the platform you select. There will be a lot of text and scrolling. Only few commands may require your confirmation. Entering will select the default choice. Like installing any other operating system on a physical machine, installation could take some time.
VNC configuration
You will be prompted to select a resolution for the VNC server in the installation’s last phase. A tool that enables remote desktop access is the VNC server. It is often used to establish a network connection to a laptop or PC from a distant location. In this instance, Linux is running inside of Termux, and a VNC client is required to access the graphical user interface. RealVNC is available for download from the Play Store. There are further options available as well.
Connect to VNC server of smartphone
Open the VNC viewer on your phone after starting the VNC server and installing your Linux distribution. A server address input field will be presented to you. To connect, type localhost:1 and click. Your VNC client should now be able to connect to the Linux installation running on your smartphone.
Linux distribution is up and running
Now, you may use the Linux distribution on your smartphone in the same way that you would on a laptop or desktop. You can access the distro’s app store to add more programmes, or you can launch the Linux distribution’s console to add more packages. You can run apps and programmes that won’t ever operate natively on your Android smartphone as well as add backgrounds, save data, and perform a tonne of other things.
Similar to how you would shut down any other laptop or computer, the Linux distribution should be shutdown. Closing the Termux application will also force the Linux distribution to go down, albeit doing so is not advised.
Booting Linux distribution
Your Linux distribution might not be able to be fixed in a straightforward manner. Run Termux and enter ls to accomplish this. Name every file in that folder. A file with the.sh extension is required. Run it with the command./start ubuntu20.sh (or the filename of your Linux distribution). Your Linux installation will reboot as a result. You should be able to log back into the Linux desktop using VNC once it has finished booting after a brief delay. Alternatively, you can enter vncserver into the console and hit Enter even if the VNC server is not active.
There are several techniques to enable network access to your VNC server. This enables you to use a laptop or PC connected to your network to access the Linux operating system on your phone. To utilise a wireless keyboard or mouse with a PC connected to a TV or monitor, you can alternatively purchase an OTG adapter or use Bluetooth to connect a wireless keyboard or mouse to your phone. It’s up to your creativity what you want to do with this setup; the possibilities are unlimited.
Final Words
We hope you like our article on how to connect Linux system with Android phone. Most of the time these days, when working on a PC, we need to transfer data and files to and from the computer using our phones. Therefore, there is always a need for software that links our smartphones to a PC so that we may transfer files between them and also fully remote control them to view critical notifications and emails. KDE-Connect is essentially a mobile companion that allows us to utilize our android device to remotely control and administer our computer system, and vice versa.