Menu Close

Termux

Termux is a versatile and powerful terminal emulator and Linux environment app for Android. It allows users to run a Linux distribution alongside their Android OS, providing a command-line interface for managing and interacting with the underlying system. Here are some key features and aspects of Termux:

  1. Terminal Emulator: Termux offers a command-line interface that supports various Unix shell environments, including Bash, Zsh, and Fish.
  2. Linux Package Management: It includes the APT package manager, allowing users to install a wide range of Linux packages and software directly onto their Android device. This includes programming languages, text editors, development tools, and more.
  3. Programming and Development: Termux supports a variety of programming languages such as Python, Ruby, Node.js, and C/C++. It is commonly used by developers for coding, scripting, and running development servers on their Android devices.
  4. Customization: Users can customize their Termux environment with dotfiles, shell configurations, and other settings to suit their workflow and preferences.
  5. Networking and Remote Access: Termux can be used for SSH access, running web servers, and managing network-related tasks. It is particularly useful for system administrators and network engineers.
  6. Integration with Android: Termux can interact with Android APIs, allowing scripts and programs to leverage Android features such as notifications, clipboard access, and more.
  7. Portability: As an app that runs on Android devices, Termux provides a portable Linux environment that can be carried and used on the go.
  8. Community and Support: There is an active community of Termux users and developers who contribute to its ecosystem, providing tutorials, scripts, and packages.

Overall, Termux transforms an Android device into a powerful tool for learning, development, and system administration by bridging the gap between mobile and traditional Linux environments.

How to install Termux ?

To install Termux on your Android device, follow these steps:

Step-by-Step Installation Guide:

  1. Open the Google Play Store:
    • On your Android device, open the Google Play Store app.
  2. Search for Termux:
    • In the search bar, type “Termux” and press enter. Look for the Termux app developed by Fredrik Fornwall.
  3. Install Termux:
    • Tap on the Termux app from the search results.
    • Tap the “Install” button. The app will download and install on your device.
  4. Open Termux:
    • Once installed, tap the “Open” button to launch Termux, or find the Termux icon in your app drawer and tap it.
  5. Initial Setup:
    • When you open Termux for the first time, it will set up its environment. This might take a few seconds.
    • After the initial setup, you will be greeted with a command-line interface.
  6. Update and Upgrade Packages:
    • It’s good practice to update the package lists and upgrade installed packages to the latest versions. In the Termux terminal, type the following commands:
      pkg update
      pkg upgrade
      
      • Press enter and follow any prompts to complete the updates.

Alternative Installation Method (APK Download):

If the Google Play Store is not available on your device, you can also install Termux via APK:

    1. Download the APK:
      • Open your device’s web browser and visit the official Termux GitHub page: Termux GitHub Releases.
      • Find the latest release and download the APK file.
    2. Enable Unknown Sources:
      • Before installing the APK, you need to enable installations from unknown sources. Go to “Settings” > “Security” > “Install unknown apps” (or similar, depending on your Android version) and allow your browser or file manager to install APKs.
    3. Install the APK:
      • Once the APK file is downloaded, open your file manager, navigate to the download location, and tap the APK file.
      • Follow the prompts to install Termux.
    4. Open Termux and Initial Setup:
      • After installation, open Termux and follow the initial setup and update steps as described above.

Additional Tips:

  • Installing Additional Packages:
    • You can install additional packages using the pkg command. For example, to install Python, use:
      pkg install python
      

       

    • Accessing Help and Documentation:
      • Use the pkg help command to get more information about package management in Termux.

Basic Termux commands list

After installing, open the application and start your linux journey with some basic commands :

1. Package management :

Linux terminals require a package manager for installation, uninstallation, updating, and managing software packages. Termux comes with its own package manager. ‘pkg‘ here are some package management Termux commands list :

  • $ pkg update : update installed packages to the latest version.
  • $ pkg upgrade : upgrade installed packages to the latest version.
  • $ pkg install {package_name} : to install package like python, git ect.
  • $ pkg uninstall {package_name} : to uninstall a package from  Termux.
  • $ pkg list-installed : list of installed packages.

 

 

2. Directory and file management :

Directory and file managing in Linux is a must-have skill for any Linux user. With this  Termux Commands list, you can use it to create, move, copy, delete, and customise files:

  • $ cd {directory_name} : move to specific directory.
  • $ cd : go back to the past directory.
  • $ cd $HOME : go back to the home directory.
  • $ ls : list of all files in present directory.
  • $ cp {file_name} : copy files.
  • $ rm {file_name} : remove file (delete).
  • $ rm -rf {directory_name} : remove directory (delete).
  • $ touch {file_name} : to create a new file in Termux.
  • $ mkdir {directory_name} : create a new directory in Termux.

    3. File running commands:

    Termux allows you to run different types of files using specific commands based on the file type. Here are some file-running  Termux commands:

    • $ bash {file_name.sh} : To run a Bash file.
    • $ sh {file_name.sh}: To a shell file.
    • $ python {file_name.py}: To run a Python file.
    • $ node {file_name.js}: To run a JavaScript file using Node.js.
    • $ php {file_name.php}: To run a PHP file.

        4. File editing :

        Nano and  vim text editors are essential for script editing and file configuration in Termux. Here are some basic Termux file editing commands :

        • $ cat {file_name} : To open a text file.
        • $ nano {file_name} : To modify a file, using the Nano text editor.
        • $ vim {file_name} : To do any advance editing, launch the Vim text editor.

         

         

        5. Networking :

        Termux networking commands allow users to do many types of network-related work on their device. Here are some basic  Termux networking commands :

        • $ ifconfig : display information about your network.
        • $ curl {url} : Download or display a web page from a URL.
        • $ wget {url} : The command is to download a file from a specific URL.

        6. Management of System and Processes:

        Termux allows you to manage system processes and connect with the system of your Android device using various commands :

        • $ ps : List of running processes.
        • $ kill {process_id} : To end a running process (kill)
        • $ top : Display the current state of your system’s resources.
        • $ uptime : Provide information about your system uptime.

        7. Basic commands :

        These commands serve a few roles :

        • $ termux-setup-storage : Allow access to your device shared storage.
        • $ whoami : Your current username in Termux.
        • $ clear : To clear the current Termux terminal screen.
        • $ exit : Exit the current session or terminal.

          Related Entries

          Leave a Reply