Quick Way to Look Up System Info on Termux

Normally you would have to click through a few GUI buttons to fetch some system information. With Termux you just have to type one word: neofetch.

Look at that cute little guy!

Now I will admit this is a very geeky and a niche way to get some of your system info. The point of doing this via the command line is that it is much quicker to get the information you need then trying to get to the right tab via the GUI. What’s above in the picture isn’t all the information you can get. Let’s take a look at how we can modify it go get some more information.

First you need to download Neofetch:

pkg install neofetch

It already comes configured so you can type neofetch and you will get something similar to what the pic has above. There are more options to choose from so lets take a look at the config file and see what else we can come up with. To get to the config file type ls -a to see what we have in the home folder within Termux. It will probable look similar to thins:

. .. .bash_history  .config  .local  .ssh  storage

The folder we are looking for is the .config so go ahead and cd into it. Type ls and this time you should see a folder marked neofetch. Now cd into that folder and the only thing in there should be the config.conf file. Lets edit it with nano. (You might have to install nano so type in pkg install nano).

nano config.conf

You should have an output similar to this:

# Neofetch config file
# https://github.com/dylanaraps/neofetch
# See this wiki page for more info:
# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
print_info() {
info title
info underline
info "OS" distro
info "Host" model
info "Kernel" kernel
info "Uptime" uptime
info "Packages" packages
info "Shell" shell
info "Resolution" resolution
info "DE" de
info "WM" wm
info "WM Theme" wm_theme
info "Theme" theme
info "Icons" icons
info "Terminal" term
info "Terminal Font" term_font
info "CPU" cpu
info "GPU" gpu
info "Memory" memory
info "GPU Driver" gpu_driver # Linux/macOS only
info "CPU Usage" cpu_usage
# info "Disk" disk
# info "Battery" battery
# info "Font" font
# info "Song" song
# info "Local IP" local_ip
# info "Public IP" public_ip
# info "Users" users
# info "Install Date" install_date
# info "Locale" locale # This only works on glibc systems.
info line_break
info cols
info line_break
}

This isn’t all that is in the config file, but enough of the options for us to choose what we want. You can easily disable info from printing by adding a # to the start of the line. The reverse if you do not want any line to print. Not all of these options are suitable for Android. This package is focused more on desktop computers and with not having root access to your phone it will limit what you will be shown. So, you should play around with the options to see what information will print for you.

There are a couple of things you can add that are not part of the list. The first is the weather. You put this line of code in and it will give you the weather for the location of your IP address (this means it might not be your actual physical location):

prin "Weather" "$(curl wttr.in/?0?q?T | awk '/°(C|F)/ {printf $(NF-1) $(NF) " ("a")"} /,/ {a=$0}')"

You can place that line anywhere between the {}. Also, using the prin command you can add a custom message or information line. Your lines could look like this:

prin "They say the command line is too hard."prin "Date" "$(date)"

For more information about what you could add to the information neofetch prints for you visit their wiki. Do share some of the options you come up with or try in the comments below!

I write about technology, faith, and a smattering of other subjects.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store