fbpx

How to Use the Linux Command Line on Android With Termux

Android is a powerful operating system because it has a wide range of applications that are nearly as good as those on the desktop. However, it can be difficult to accomplish something on Android that would be a cinch on a desktop computer. ”

As a first step, you can use Android’s built-in Linux infrastructure. In order to run Linux apps on your Android device, the Termux app provides a command-line environment. Learn how to use the Termux app by following these simple steps:

Benefits of Using Termux

Termux is a self-contained Linux system. For the most part, its programs are identical to their Linux counterparts in terms of features. Compared to ported applications, this has some benefits:

  • Consistency: There must be some kind of user interface in order for Linux apps that have been ported over to Android to be consistent. The quality of the user experience on Android largely depends on how much effort the developer puts into it. Termux apps, on the other hand, are identical to their Linux counterparts in every way, from keyboard shortcuts to how they’re installed.
  • Compactness: When Android code is added to a slim application, it can make it heavier. Android SSH clients can be anywhere from 2MB to 12MB large, for example. Termux’s Dropbear, on the other hand, is just 396KB (that’s kilobytes) in size when installed. It also comes with an SSH server.
  • Timeless: As long as an Android app’s developer releases an update, you’re at their mercy for an upgrade. There is no need to constantly update Termux applications, which are standard Linux packages. Desktop versions may even be created automatically. Termux is more likely to give you early access to new features.
  • Free: It’s possible that any app you buy from the Play Store has a fee attached to it. Termux and its apps are both free and open source.

How to Download Termux

Before we dive into the tutorial, you have to get Termux first on your Android device.

Kindly visit Playstore and then Search “Termux” on the search Box. Or visit link below to Download Immediately.

Download: Termux (Free)

Basic Termux Commands You Should Know

Linux distros like Debian, Ubuntu, and others use the same package installer as Termux.

When it comes to finding, installing, and removing packages, Advanced Packaging Tools (or APT) is the tool of choice. Use these commands to update and upgrade your software:

apt update
apt upgrade

How to get to know the apps that are available:

apt list

To find out more about one of these packages, use

apt show [package name]

The name, maintainer, file size, dependencies, and other useful information can be found here. To install an app, all you need to do is type in the following command:

apt install [package name]

Termux’s built-in command list is available on Android:

  • cp

    lets you copy a file

  • mv

    will move a file

  • ls

    lists the contents of a directory

  • rm

    deletes (removes) data

  • ln

    creates a symbolic link (for example,

    ln /data/data/com.termux/files/home/documents to /sdcard/Documents

     

You don’t need an Android file manager if you use these built-in options. Moreover, these apps don’t necessitate that you root your phone in order to use these features.

Termux Command Line Apps for Installing Linux Programs

Installing useful Linux apps on Android can be done with the help of apt and the Termux terminal. This is a wide range, so let’s take a look at a few of the highlights.

Text Editors

Text editors like VIM and Emacs are supported by Termux, which includes the most recent versions. Many other editors are available in addition to minimalist nano.

In addition to being available on desktop platforms, terminal-based editors can meet all of these requirements in a single program.

Termux Command Line Utilities

Many useful Linux command line utilities are included in Termux packages:

  • gnuplot: A mathematical graphing program
  • ImageMagick: An image manipulation and conversion toolkit
  • p7zip: An archiving utility for the 7-Zip compression scheme
  • UnRAR: A different archive tool for the RAR format
  • Wget: A program to fetch files over the internet via HTTP or FTP

Install Servers in Termux

For Linux web servers, Termux offers Apache, nginx, and lighttpd.

It’s important to remember that many of today’s most popular applications are web-based as well as written. Taiga project management platform, for example, can be installed with nginx, the PostgreSQL database and Python. This provides a great deal of value without the need for any third-party services or hosting.

Also included is Dropbear, an SSH server and client that allows you to access your phone or tablet and transfer files. Termux also includes this feature Useful in situations where sharing a few files but not using cloud services is necessary. Take what you need from the Dropbear server, and then shut it down by using an SSH client.

Development Apps in the Termux Command Line

It offers standard distributions of programming languages such as:

  • BASH shell (the default available out of the box, and a great way to get started hacking around)
  • Python (both v2 and v3 are available)
  • PHP
  • Ruby

git and Subversion, two popular source control systems, are also available for use outside of the development process. Your files can be stored in any location of your choosing with source control. As well as being able to use “tags” to label versions, you can also control when other devices receive updates.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

Back to top button