The android command line can be rich featured thanks to Linux, in order to get a terminal with a Linux environment I recommend you to install Termux available in F-droid as well as the Play Store.
Its very important to use the Linux commands in your Android since it will help you to use Free and Open source software instead of the untrusty privative software.
In zsh.li/cat I showed you that I Installed only minimalist applications and only FOSS applications in my cellphone. However there I recommended you a privative application for compressed files. I’m sorry, since you can use the terminal instead.
Please notice that in order to work properly with the Android command line, you will need a rooted device, Termux runs into a sandbox, which means that everything you do in the terminal is isolated from most of android applications. In order to make files available for the Android applications you have to move your sandboxed files using a root shell, with the su command.
The sandboxed environment is /data/data/com.termux/files/home, it’s too long for remember, so we will create a symbolic link, to do so check the following steps.
- Run the whoami command, and write the output in a visible place
- Run the su command
- Mount the system filesystem as read write mode
mount -o remount,rw /system
- Create the symbolic link
ln -s /data/data/com.termux/files/home /system/t
- execute the following command where USER is the username that you wrote in the first step
chown USER /system/t
Finally any file that you want to make available for the android applications you can move it as root
su -c “mv /system/t/file /sdcard”
Working with an existing file
For working with existing files you must allow Termux to access to files in the apps configuration.
- Minimalist text editor there are plenty of text editors for android, but them are too sofisticated, you can simply use termux and nano
Wget is a powerful download utility for the POSIX systems
- Compress to 7z using the 7za command
- Compress and decompress zip files
- Convert images to another format using the convert command
- Convert videos and music to another format using ffmpeg
- Download YouTube videos or only the audio using the youtube-dl script
- Download streaming music with streamripper script
- Upload files to ftp server using curlftp or curl
- Split in parts and join the parts using the split and cat command respectively
- Encrypt and decrypt files with gpg
With these examples you will need 10 android applications with lots ads and abusive terms and conditions for getting the same functionality , also you have to deal with the lost of privacy as well as a bad performance.
Finally I also want to recommend you the netstat command that helps to monitor your network conditions, and gnuchess for playing chess.