Using Linux on Android
You can run Linux/UNIX commands on your Android device in several ways: from a simple terminal with the basic commands to a full Linux distribution with a graphical user interface.
(A) Terminal Emulator + BusyBox
The simplest and least resource-intensive option is installing a simple Terminal emulator (like Jackpal’s Android Terminal Emulator) and BusyBox, a GNU-alternative for embedded systems (there are several BusyBox apps on the Play Store, this is one).
If you download this BusyBox app, you will need to open the app (DO NOT press the Install button inside the app if you don’t have a rooted device), then close it and open the Terminal emulator and paste this to add the BusyBox commands to the Terminal PATH:
Termux is a Terminal emulator with its own repositories, so you can install a lot of packages. Although it is compatible with old Android devices, its package manager could not run on your device (more info on the github page).
UserLAnd allows you to install full linux distros (from a restricted list) on your device in which you can connect by a Terminal or VNC (you can install graphical applications if your device is powerful enough).