Getting Started with TERMUX π²
John Johnson Okah
Posted on July 20, 2023
Have you ever been stuck with just your phone on a bus or in a boring environment and all you could think of is getting right back to your Dev environment? π§βπ»
If you've got an Android device, we've got good news. ‡
Termux essentially turns an Android device into a lightweight and portable development environment, enabling users to perform various tasks, such as coding, scripting, system administration, and network testing, directly on their smartphones or tablets.
The Introduction π
Termux is an Android terminal emulator and Linux environment app that allows users to run a full-fledged Linux distribution on their Android devices. It provides a powerful command-line interface (CLI) that enables users to execute various Unix commands, run shell scripts, and access a wide range of Linux tools and utilities directly on their Android smartphones or tablets.
Termux provides a convenient and flexible environment for developers, system administrators, and enthusiasts who want to perform tasks such as programming, scripting, development, testing, and system management on their Android devices. It offers access to a package manager (pkg
) that allows users to install various software packages, including programming languages, text editors, version control systems, networking tools, and more.
With Termux, users can perform tasks similar to what they would do on a traditional Linux distribution, making it a popular choice for those who need a Linux-like environment on their mobile devices. It's worth noting that while Termux provides a Linux-like environment, it operates within the confines of Android's security mechanisms, so it might not have access to certain system-level functions or require root permissions for some operations.
The Setup βοΈ
Setting up Termux on an Android device is a straightforward process. Here's a step-by-step guide to help you get started:
1. Download and Install Termux
from Play Store
β Go to Google Play Store
β And install the Termux app
OR
from F-Droid:
β Go to F-Droid App Store.
β Search for the Termux APK file and click Download
β Open the APK file and install it on your device
2. Open Termux:
β After the installation is complete, tap on the "Open" button to launch Termux.
3. Update and Upgrade Termux Packages:
β Once Termux is open, update and upgrade the packages to ensure you have the latest versions.
Run this command :
pkg update
to update the package lists and Run:
pkg upgrade
to upgrade all the installed packages to their latest versions.
4. Grant Access to Storage
β Finally, permit Termux to access files in your device's internal storage that includes directories like DCIM, Downloads, and Documents.
β Run this command to grant access:
termux-setup-storage
Accept the pop-up notification on your device requesting file access from Termux.
The Features π οΈ
Termux comes with a range of powerful features that allow users to leverage a full-fledged Linux environment on their Android devices. Some of its key features include:
1. Terminal Emulator: Termux provides a fully functional terminal emulator that enables users to run various Unix commands, execute shell scripts, and interact with the Linux command-line interface (CLI) directly on their Android devices. Commands such asΒ ls
,Β cd
,Β mv
,Β cp
,Β touch
Β are available in Termux.
2. Package Management: Termux includes a package manager (pkg) that allows users to install, update, and remove software packages from a vast repository of Linux tools and utilities. This makes it easy to extend the functionality of Termux with various programming languages, text editors, development tools, networking utilities, and more.
Install a package with this:
pkg install <package-name>
where <package-name>
can be ffmpeg
, vim
, git
, ...
3. Programming and Development Environment: Termux provides a platform for developers to write, compile, and run code directly on their Android devices. Users can work on coding projects using languages like Python, Ruby, Node.js, and C/C++
Run this command to install Python:
pkg install python3
Then you can install Python packages with pip:
pip install <package-name>
where <package-name>
can be pytest
, yt-dlp
, flask
, ...
4. OpenSSH and OpenSSL: Termux includes OpenSSH and OpenSSL, which provide secure encrypted communications and cryptographic functions, respectively.
5. File Access: Users can access and manipulate files on their devices, making it easy to work with all kinds of files from the terminal. In Termux, files on your device storage are located at /data/data/com.termux/files/shared/storage/
6. Text Processing Tools: Termux offers a variety of text processing tools like grep, sed, awk, and regular expressions, which are valuable for text manipulation and analysis.
7. Scripting and Task Automation: Users can create and run shell scripts on their Android devices, enabling automation of repetitive tasks.
8. Customization: Users can customize their Termux environment with themes, fonts, and various configurations to suit their preferences and workflow.
The Conclusion π
Overall, Termux stands as a reliable and user-friendly solution, allowing individuals to embrace the power of a Linux environment on their Android devices, making it an invaluable tool for learning, productivity, and creativity, all in the palm of their hands.
PS:
- The F-droid Termux app can't install updates from Play Store.
- Do not install suspicious packages and do not run random scripts from the internet on Termux.
- For more Info visit Termux βΉοΈ Wiki, for Discussions visit Termux π¬ Reddit, and to Report Bugs visit Termux π Github.
Good luck and have fun exploring
Posted on July 20, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.