This brief guide explains what is ramfetch, how to install ramfetch in Linux, and how to display Memory information using ramfetch in Linux operating systems.
What is ramfetch?
There are many fetch programs (E.g. Neofetch, Screenfetch, Macchina etc.) exists for Linux.
These applications are used to display the general Linux system information, such as Linux OS version, Hostname, Processor, Kernel, Memory, Window Manager, Desktop Environment, Terminal and System Fonts etc.
Today, we will discuss a similar utility called ramfetch which will display only the RAM details.
The ramfetch utility is a commandline program to fetch Memory information using
/proc/meminfo. It parses the
/proc/meminfo file and displays the Memory information in a neat output. Unlike the other fetch programs, it displays memory information only.
The ramfetch is just a shell script and its source code is freely available in GitHub.
Install ramfetch in Linux
To install ramfetch in Linux, git clone its official repository using command:
$ git clone https://github.com/gentoo-btw/ramfetch
This will clone the contents of ramfetch online repository into a local directory named ramfetch.
Cloning into 'ramfetch'... remote: Enumerating objects: 179, done. remote: Counting objects: 100% (75/75), done. remote: Compressing objects: 100% (60/60), done. remote: Total 179 (delta 28), reused 0 (delta 0), pack-reused 104 Receiving objects: 100% (179/179), 377.04 KiB | 2.09 MiB/s, done. Resolving deltas: 100% (74/74), done.
Copy the ramfetch binary file to your system path, for example
$ sudo cp ramfetch/ramfetch /usr/local/bin/
Make it executable:
$ sudo chmod +x /usr/local/bin/ramfetch
That's it. We just installed ramfetch. Let us move on to find out RAM
Display Memory Information using ramfetch
To fetch RAM details with ramfetch, simply run it using command:
As you can see in the above output, ramfetch displays the following memory details in a nice format along with an ASCII logo:
- Total RAM size,
- Free available RAM,
- SWAP memory total,
- SWAP free,
- Kernel stack,
- HugePages total,
- HugePages free.
The ramfetch is small shell script that does only one job i.e. displaying Memory information in Linux. Nothing more, nothing less!
Of course, we could simply use either
cat /proc/meminfo directly or use
free -h commands to display RAM information in Linux. However if you'd like to use a script for any reason, ramfetch will come in handy.
To remove ramfetch, simply remove the executable file from your system path location.
$ sudo rm /usr/local/bin/ramfetch
The ramfetch utility is in its early development stage. So you might expect bugs. Feel free to file bug reports via its official GitHub page given below.