Tutorials
Sending SMS Messages with Termux on Android
1 October 2023

Introduction
In this blog post, we'll explore how to use Termux on your Android device to send SMS messages using your own phone number. Termux is a powerful terminal emulator and Linux environment app that brings the power of the command line to your mobile device.
Prerequisites
- An Android device with an active SIM card and SMS capabilities.
- Installation of Termux and Termux:API from F-Droid.
- Basic knowledge of command-line operations.
Step 1: Install Termux and Termux:API
Since the Google Play Store versions are outdated, install both apps from F-Droid to get the latest updates.
- Install F-Droid by downloading it from https://f-droid.org/.
- Open F-Droid and search for "Termux" and "Termux:API".
- Install both applications.
Step 2: Set Up Termux
Open Termux and update the package lists:
pkg update && pkg upgrade
pkg install termux-api
Step 3: Grant Necessary Permissions
Termux needs permission to send SMS messages. Grant permissions by going to your device's settings:
- Navigate to Settings > Apps > Termux > Permissions.
- Enable the SMS permission.
Step 4: Send an SMS Message
Use the following command to send an SMS message:
termux-sms-send -n +1234567890 "Hello from Termux!"
Replace +1234567890 with the recipient's phone number and customize the message as needed.
Conclusion
With Termux and Termux:API, you can leverage the power of the Linux command line on your Android device to send SMS messages. This can be particularly useful for automation tasks, alerts, or integrating SMS functionality into your scripts.