Many of you might familiar with the fact that Android is an operating system based on the Linux kernel. It is free and open-source, the source code of Android is known as Android Open Source Project (AOSP).
In a Linux system, a terminal is a powerful tool that can be used for almost any task including the tasks such as installing and managing packages, monitoring system resources, etc. Now you can have the question that can I use the Linux terminal on an android phone? The answer to this is yes, you can use the Linux terminal in Android with the help of some applications available on the play store for example Termux.
Termux is a terminal emulator for android, It also doesn’t require you to root your device. In this article, I will discuss how to use the Linux terminal on Android using Termux.
Install Termux on Android
The simplest way to install Termux on Android is to download it from the Google Play store. On your android phone –
- Open Google Play store
- Search for termux
- Locate and tap the entry by Fredrik Fornwall
- Next tap to Install
- Read the permissions and tap Accept
This will start the downloading Termux application on your phone wait to complete it. It installs a minimal base system automatically, you can download the additional packages by using a package manager.
Alternatively, you can download Termux from F-Droid.
How to use commands in Termux
If you are familiar with Linux commands then you can use them on the Termux interface. Termux uses apt as the backend for managing packages and pkg is used as a simplified frontend interface.
To update the local package database as we do on Ubuntu, open the Termux app on your phone and then use –
To install updates use –
You can use the given command to display the list of available packages –
You can see the output in the given image –
If you want to display the details of one of the given packages then use –
apt show [package_name]
Remove the package name with the actual package –
For example –
apt show git
Similarly to install a package use –
apt install [package_name]
For example –
apt install nano
Exiting the Termux
For exiting from the Termux application you just need to execute the exit command. This will close the app and, bring you back to Android.
To learn more about the usage of this app you could read its official documentation page.
By installing Termux on your phone you can learn about how to use the Linux terminal.
For any query write us in the comments below.