Hardinfo like program for termux



 Hardinfo-like Program for Termux: A Comprehensive Guide

In the world of Linux and Unix-based operating systems, hardware information tools like Hardinfo provide a comprehensive summary of the system’s hardware and software. Hardinfo, a graphical application, gathers information about various aspects of the system, such as CPU, memory, disk, network, and much more. For users of Termux, the terminal emulator on Android, finding an equivalent that provides similar functionality can be a bit tricky, especially since Termux doesn’t have a graphical interface. However, there are ways to gather similar system information directly from the terminal, and this article will discuss how to replicate or approximate Hardinfo's features in Termux, utilizing various tools and commands.

1. Overview of Hardinfo

Hardinfo is a popular tool that provides detailed information about your system’s hardware components and configuration. It can be used to gather information about:

  • CPU: Architecture, cores, frequency, and cache size.
  • Memory: RAM, swap, and utilization.
  • Disk: Partitions, file systems, and space usage.
  • Graphics: GPU details and drivers.
  • Network: Interface, IP address, and connection speed.
  • Sensors: Temperature sensors, fan speed, and power management.
  • Operating System: Version, kernel, and system processes.

While Hardinfo is generally used on desktop Linux systems with a graphical interface, Termux operates entirely from the command line, making it necessary to use different approaches to obtain system information.

2. Setting Up Termux to Gather System Information

To collect system information in Termux, there are several tools and packages available through the Termux package manager. These tools can be installed using the pkg or apt commands, which are standard in Termux. Below, we'll look at some of the most effective tools to gather system information in Termux.

3. System Information Tools in Termux

Termux doesn’t have an integrated GUI like Hardinfo, but by using the right tools and commands, you can retrieve most of the information that Hardinfo would provide.

a. Neofetch

Neofetch is a popular command-line utility for displaying system information in a visually appealing format. Although not as comprehensive as Hardinfo in terms of hardware details, it provides a succinct overview of your system’s specs, including:

  • Operating system
  • Kernel version
  • Uptime
  • Packages installed
  • CPU and RAM usage
  • Resolution
  • Desktop environment (in the case of Linux desktops)

Installation and Use:

To install Neofetch on Termux, you can use the following command:

pkg install neofetch

Once installed, you can simply run:

neofetch

This will display a colorful output that includes your system’s key details, like:

  ____                   _        
 / ___| ___   ___   __ _| |_ ___  
| |  _ / _ \ / _ \ / _` | __/ _ \ 
| |_| | (_) | (_) | (_| | ||  __/ 
 \____|\___/ \___/ \__,_|\__\___| 
                                    
                                  
OS: Android 10
Kernel: 4.14.83
Uptime: 1 day, 4 hours
Packages: 198
Shell: bash
CPU: ARMv7 1.2GHz
RAM: 512MB/2GB

b. Inxi

Inxi is another great system information tool that can be used in Termux. It’s a powerful and versatile script that provides detailed system information, similar to Hardinfo. With Inxi, you can gather information on:

  • System: Kernel, uptime, distribution.
  • CPU: Cores, speed, model.
  • Graphics: GPU, driver.
  • Memory: Total, used, and swap.
  • Storage: Disk partitions and space usage.
  • Network: IP address, routing, interfaces.

Installation and Use:

To install Inxi in Termux, use the following command:

pkg install inxi

Once installed, running inxi gives you detailed output:

inxi -Fxz

This command provides detailed information about your system, like so:

System:    Host: localhost.localdomain Kernel: 4.14.83-103538 Android
           CPU: ARMv7 (8) @ 1.20GHz
           Memory: 1GB
           Uptime: 1d 4h 10m
           Packages: 1100 (pkg, apt)
Disk:      Storage: 32GB (50% used)
           Partition: 5GB in /data, 1GB in /system
Network:   Device: wlan0
           IP: 192.168.0.101
           MAC: 00:11:22:33:44:55
           Speed: 100Mbps
Graphics:  Device: Mali-400MP
           Driver: FreeRDP

c. CPUinfo and Meminfo

In Termux, you can retrieve CPU and memory information using the system’s own /proc files, which provide raw data about various system components.

  • CPU Information: To view detailed information about your device’s CPU, including its cores, speed, and model, you can read the /proc/cpuinfo file:

    cat /proc/cpuinfo
    

    This file contains detailed information about your device’s CPU, such as:

    Processor   : ARMv7 Processor rev 5 (v7l)
    BogoMIPS    : 1192.51
    Features    : half thumb fastmult vfp edsp java 
    CPU implementer  : 0x41
    CPU architecture: 7
    CPU part     : 0xc07
    CPU revision  : 5
    
  • Memory Information: To view memory usage (RAM, swap, etc.), use the /proc/meminfo file:

    cat /proc/meminfo
    

    This file will show the total, free, and available memory, as well as swap usage:

    MemTotal:        2048000 kB
    MemFree:         1024000 kB
    Buffers:          102400 kB
    SwapTotal:        0 kB
    SwapFree:         0 kB
    

d. lscpu and lsusb

You can use the lscpu and lsusb commands to gather information about the CPU architecture and USB devices, respectively.

  • lscpu:

    lscpu
    

    This will display detailed information about your CPU, including architecture, model, cores, threads, and other details.

  • lsusb (useful for identifying USB devices):

    lsusb
    

    It will show information about all connected USB devices, like:

    Bus 001 Device 004: ID 0bda:5411 Realtek Semiconductor Corp. USB2.0 WLAN
    

e. Disk Usage and File System Information

To view disk usage, partitions, and other file system details, you can use the following commands:

  • df: The df command shows available disk space across all mounted filesystems:

    df -h
    
  • lsblk: To display detailed information about block devices, such as partitions and disks:

    lsblk
    
  • fdisk: For more advanced disk partitioning information, use the fdisk utility:

    fdisk -l
    

f. Sensors

While Android devices may not have the same sensors as typical Linux machines, you can still retrieve certain hardware sensor information on supported devices using the Termux Sensors package.

  • Install Termux Sensors:

    pkg install termux-api
    
  • Get Sensor Information:

    termux-sensor
    

This will display available sensors, such as temperature, accelerometer, and light sensors.

4. Using Termux API to Gather System Information

In addition to traditional Linux tools, Termux provides an API that allows access to additional hardware-related information, such as battery status, location, and sensors. To use the Termux API, you’ll need to install the termux-api package.

Installation:

pkg install termux-api

Examples:

  • To check the battery status, run:

    termux-battery-status
    
  • To check the location (if permissions are granted), run:

    termux-location
    

5. Alternatives for Hardinfo in Termux

While Hardinfo itself isn’t available for Termux, the combination of tools mentioned above provides a comprehensive approach to gathering system information. Depending on your needs, you can choose specific tools for specific tasks:

  • Neofetch for a quick summary.
  • Inxi for detailed system reports.
  • /proc files for low-level hardware details.
  • Termux API for Android-specific data (battery, sensors, etc.).

Using these tools, you can replicate much of the functionality Hardinfo provides on a traditional Linux system. These command-line tools allow you to access a wide range of system information from the comfort of your Android device.

Conclusion

While Termux doesn't have a direct equivalent to Hardinfo due to its command-line nature, it provides an array of powerful tools to collect and display system information. Using utilities like Neofetch, Inxi, /proc files, and Termux API, you can easily gather hardware and software details about your Android device or remote systems. These tools offer a robust alternative to graphical system information utilities, enabling you to manage and monitor your system efficiently from the terminal. By combining the right tools, Termux users can enjoy a rich set of features for system diagnostics, performance monitoring, and more.

Post a Comment

Cookie Consent
Zupitek's serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.