Terminal emulators are apps that let you interact with the operating system through text commands. You might have seen or used the Windows Command Prompt at some point. We can get a terminal emulator like that on Android too. Termux is the definitive terminal emulator app for Android. It's open source, and you can get it from the F-Droid store (the Play Store version is obsolete). The app has a thriving community of Android enthusiasts who have made it a beautiful powerhouse. The terminal might seem like an anachronism replaced by superior graphical interfaces, but nothing could be further from the truth. It can do so many awesome things. Test your internet speed No need to get a separate app for this Termux lets you test your internet speed without opening a browser or downloading a dedicated app. It's faster too, because you can initiate a test without loading a website. Plus, you can choose whether to test download or upload speed. Let's start by updating the list of available Termux packages. pkg update Now we'll install Python. This programming package is a must-have because it gives you access to Python's package manager, Pip (it also lets you run Python scripts within Termux). pkg install python With Python installed, we can use pip to install the speed test software. pip install speedtest-cli There you have it. You can now open Termux at any time, enter the command speedtest, and get your current download and upload speeds. speedtest Beyond basic speed tests, a command-line tool like this unlocks functionality that you can't get with a commercial app. For starters, you can create custom programming scripts using speedtest-cli. Say you want to check whether your provider delivers the speeds you were promised. It takes a simple script that runs in the background at set intervals, triggers the speedtest command, and logs the results in a spreadsheet (another feature this tool has). The logs show you if you are getting your money's worth. Check the weather Fast and lightweight weather reports This command works on most systems because it uses a tool that's often built-in by default. Just type curl followed by this address. curl wttr.in You can specify the city or region: curl wttr.in/newyork It instantly produces a cute ASCII weather forecast for the next three days. The next part is optional, but if you want to create shortcuts for specific regions, you can do that with Termux. Just like we can create visual desktop shortcuts to quickly launch apps, we can also create "aliases" for the terminal. An alias saves us the trouble of typing long commands. To create an alias for weather forecasts, we'll edit the shell configuration document. Think of the shell as the "brains" of the terminal emulator. This command opens the configuration document inside a text editor. nano ~/.bashrc Type or paste this line anywhere (specify the city if you like) in that document and save. I chose "weather" as my alias, but you can type anything you like. alias weather='curl wttr.in' Ctrl+0 and Enter saves the file, and Ctrl+X exits the nano text editor. If you don't want to edit the configuration file, paste and run this command. It'll do all that for you. echo "alias weather='curl wttr.in'" >> ~/.bashrc Now you can type weather in the terminal to get a three-day forecast. You can use this command-line tool for scripting. You can create custom programs by "curling" wttr.in URLs. You can specify language, units, layouts, formats, and everything else. It can even output the forecasts as image files. Fetch system info in style The colorful ASCII art that everyone loves You might have seen desktop terminal emulators display system info as neat and colorful ASCII art. Termux lets you do the same for Android devices. I mostly stick with fastfetch on most platforms, and it works just fine on Termux. Install it with this command: pkg install fastfetch Just run fastfetch in the terminal to get detailed system info. If you want an alternative, try macchina. pkg install macchina Then run the tool. macchina The info macchina fetches is a bit more minimal. Some people set Termux to display system info whenever it is opened. You can do that by editing the .bashrc from the previous section. Place fastfetch or macchina in a new line anywhere inside the .bashrc file. Access your phone remotely SSH into your phone from any device You don't need to type on your phone to run Termux commands. As long as the phone is online, you can access the phone's Termux shell remotely on any device using the "secure shell protocol" or SSH. By "ssh-ing" into your phone, you can control your phone from the command line. Provided you have Termux set up properly, you can access your phone's files, check and trigger some of the hardware, run scripts on it, and do everything you normally can with Termux, all from your computer or another phone. Start by opening Termux on your phone and installing the openssh software. pkg install openssh Run this software in the background. sshd Before we can access it remotely, we need three key pieces of information: The phone's IP address The random username Termux generated for your device The password to connect securely Type and run ifconfig inside Termux. This command shows the IP address. Look for the local IP address assigned to your phone. For example, mine is 192.168.100.107. Type whoami and press Enter in Termux to get the username. Mine is u0_a336. whoami Finally, let's create a new password. Enter this command and type a new password at the prompt (the characters won't be displayed, so press Enter on the prompt when you're done). passwd Now we can "ssh" into our phone from a computer. Make sure both devices are connected to the same network or Wi-Fi. Open the terminal emulator on your computer and type ssh followed by the username you found, and an IP address joined with an @ symbol. The default port will always be -p 8022. For me, the command will look like this: ssh u0_a336@192.168.100.107 -p 8022 When prompted, type yes and enter the password you previously set. That's it. You can now access your phone's Termux shell remotely. Chat with a bot Run free AI models locally and privately on your phone Your phone can run a free and lightweight AI chatbot on its native hardware if it's powerful enough. The local model won't be as sophisticated as the big cloud AI platforms, but it is free, private, and unlimited. However, if you need a beefy cloud model, you can run those in Termux. Let's start with the lightweight, local chatbot. We only need one tool for this: Ollama. It's an open source command-line tool for downloading and running open source AI models. This command should install it on your phone: pkg install ollama After it's installed successfully, run: ollama serve& Then you can download and run a model with a single command like: ollama run llama3.2:1b This command downloads the free and open source LLM model Llama 3.2 (the 1-billion parameter version optimized for phones) and starts the model. The "inference" or chatbot processing happens locally on your device, so your chat data never leaves your hands. It also means this chatbot can run without an internet connection. You can find more mobile-optimized models on the Ollama website. If you have the API keys for a cloud-powered AI model, you can plug them into the command-line tools available in the Termux library and chat with them. This includes the so-called "agentic" interfaces like the Gemini CLI. A desktop OS on your phone It's easy to set up too Termux can also "bootstrap" or quickly install entire Linux-based operating systems on your phone that normally run on desktop computers. The official tool for this job is called proot-distro. We can easily install it with a single command like this: pkg install proot-distro After a successful installation, we can list all available operating systems that you can run in Termux: proot-distro list Pick one you like, and install it using the package name as shown in the list: proot-distro install ubuntu When that's done, Termux will drop you into the Ubuntu system. Log into the Linux environment with this command: proot-distro login ubuntu By default, these systems are "headless," meaning they don't have the graphical interface we normally see. It gives you full access to the Linux OS if you know how to use its command-line system. Termux can do so much more Termux is a must-have tool for Android power users because it lets you do more than the six jobs I just mentioned. If you have a powerful device, there's no better way to tap into that hardware than Termux. For friends who like to self-host services, a phone with Termux can become part of your self-hosted stack.
6 awesome things you can do with a terminal emulator on Android
Full Article
Original Source
Read the full article at Androidpolice →KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.