How to check RAM and HDD/SSD size in Ubuntu Linux
Knowing your computer's specifications is very important as they greatly affect its capabilities and performance.
If for any reason you don't know your PC's specs (maybe you got an already configured laptop/desktop computer from someone and wasn't told its specs), it's always very easy to check them by yourself.
In this article, you will learn how to check your PC's RAM and storage space (HDD/SSD) size on Ubuntu 20.04, which will also work for other versions.
Checking RAM and storage size on Ubuntu in settings
Follow the steps below:
Step 1: Open your computer's settings. You can easily do so by clicking on any icon at the top right corner of the top bar and then clicking on the Settings from the menu that opens.
Alternatively, you can open the settings through the Applications menu.
Step 2: Scroll down on the left pane menu and click on the About option at the very bottom. You will see on the right quite a number of your computer's and OS specifications, among them being the RAM and storage space.
The RAM is labeled as Memory and the storage (HDD or SSD) space as Disk Capacity.
How to check RAM size on Ubuntu in System Monitor
The System Monitor is a tool that provides information about how the system hardware and software are working. Using it you can see the total RAM, used and free memory.
Open the Applications menu by clicking on the button at the bottom left corner then search for "system monitor" and click on it.
In the Resources tab, under the Memory and Swap History section, you will see the used RAM and the total RAM.
How to check computer RAM via command line on Ubuntu
Alternative to the graphical interface, you can check the computer's RAM via the command line using the Ubuntu terminal.
Open the terminal by using the Ctrl+Alt+T keyboard shortcut.
There are a number of commands that you can use to check the RAM but here we will check using:
- The free command
- The meminfo file
1. Using the free command
The free command comes with all the Linux distros and is used to display the amount of free and used memory in the system. It shows the RAM details in Kilobytes (KB).
The total RAM size is shown in the Mem row under the total column.
If you would like to show the details in Megabytes(MBs) instead of KBs, you will need to add the -m flag to the free command as below.
free -m
To show the details in Gigabytes(GBs), use the -h flag instead.
free -h
2. Using the meminfo file
The meminfo is a Linux system file that reports how much physical RAM a PC has, and the amount of free and used memory on the system among other details.
It's located in the "/proc" directory. You can view the RAM size by opening the file directly in the File Manager or using the command line on the terminal.
To view the RAM size from meminfo file via the terminal, run the command below:
grep MemTotal /proc/meminfo
How to check disk size using the disks utility
Open the Applications menu and search for "disks". Click on the result to open the disks utility.
You will see the disk size at the top labeled as "size" in GBs and bytes.
How to check disk size using command line
Open the terminal (Ctrl+Alt+T) and learn the command below.
dmesg | grep blocks
You can also use other popular commands such as df and du if you want to see detailed information about the disk space usage and filesystem in your computer.
That's it!
Now you know how to check the RAM and storage space size of your device in Ubuntu Linux.