DEV Community

Cover image for Termux: Give me your use cases!
ImTheDeveloper
ImTheDeveloper

Posted on

Termux: Give me your use cases!

I recently stumbled upon Termux: "the terminal emulator and linux environment for android".

Whilst it sounds pretty cool to have such an app on my phone, especially with my love for Linux I'm wondering what the wonderful use cases people have for such an app.

This especially interested me recently when I found it also has an API version which allows you to access the phone hardware APIs. I assume this could allow me to build some quite clever task runners as seen with other apps like "If this then that" and "Tasker".

I've played with a number of great node.js projects on a raspberry pi such as Node-red which appears to run nicely within Termux. This makes my android smartphone the ultimate IoT hub to play around with integrations without needing to even open up my laptop.

Please feel free to drop in the comments any of your Termux use cases I'll be fascinated to hear what others are doing with the app.

Top comments (6)

Collapse
 
voyeg3r profile image
Sérgio Araújo

Install termux-api

apt install termux-api
Enter fullscreen mode Exit fullscreen mode

ssh support

apt install openssh
Enter fullscreen mode Exit fullscreen mode

To get ssh port

logcat -s 'syslog'
Enter fullscreen mode Exit fullscreen mode

your current user:

whoami
Enter fullscreen mode Exit fullscreen mode

Now you have termux-clipboard-get and termux-clipboard-set

apt install python
pip install yturl
pip install neovim
Enter fullscreen mode Exit fullscreen mode

You can listen youtube videos with mpv

mpv --no-video url
Enter fullscreen mode Exit fullscreen mode

or

cat <<-'EOF' >> ~/.bashrc
yt(){
    mpv --no-video "$(yturl $(termux-clipboard-get))"
}
EOF
Enter fullscreen mode Exit fullscreen mode

Access you phone through ssh or copy files like

scp -P 8022 file.mp3 u0_a184@192.168.15.2:~/storage/music
Enter fullscreen mode Exit fullscreen mode

Add your own scripts

echo "PATH=~/bin:$PATH" >> ~/.bashrc
Enter fullscreen mode Exit fullscreen mode

Now you can write some scripts there.

Collapse
 
33nano profile image
Manyong'oments

Awesome stuff

Collapse
 
ycjungsubhuman profile image
Yucheol Jung

I use git in termux to synchronize markdown notes I use for life organization. The git pull/push bash script is assigned as a widget on my home screen. GUI apps in play store such as MGit did not provide specific features I required. Having a programmable shell interface is good in this case.

I suppose image/video processing can also benefit with termux since it provides ffmpeg package. I can give exact behaviour for image/video conversion job without accessing professional Adobe tools on PC. (E.g., convert video to gif, tile four videos into one video.)

Collapse
 
rupankarghosh profile image
RupankarGhosh

You can run almost any node apps on termux except the electron build one. It's a great tool to keep personal server up. Nowadays I just use termux for downloading YouTube videos with YouTube-dl and testing some python tools, I made my move to Linux recently 😍

Collapse
 
33nano profile image
Manyong'oments

Youtube dl is the way to go 👍🏽

Collapse
 
33nano profile image
Manyong'oments

Its a true extension to the linux experience