How To Check The Size Of RAM In Linux : Physical Memory In Linux

How To Check The Size Of RAM In Linux : Physical Memory In Linux

Insight: How To Check The Size Of RAM In Linux: Physical Memory In Linux

In this tutorial post, We will be talking about the Linux commands to check out the physical memory on Linux.

How To Check The Size Of RAM In Linux: Physical Memory In Linux

There is multiple ways to determine the size of RAM in Linux based operating systems.

Using the free command to check the size of RAM in Linux based operating system.

You can use this command to check RAM and SWAP details. You can simply run the following command in your terminal:

sudo free

You can use the  -b for bytes, -k for kilobytes, -m for megabytes and -g for gigabytes.

Using /proc/meminfo file to check the size of physical memory in Linux.

You can also get the detailed information of your system from the file /proc/meminfo. Run the following command to access the file and you will see the information of the memory in MemTotal column.

cat /proc/meminfo |grep MemTotal
MemTotal: 442532813 kB

Using top command to find the RAM and SWAP detail in Linux.

The top is a popular Linux command or tool. You can easily find out the details of the RAM and SWAP in Linux with the top command.

sudo top

You might see output like this:

........

Mem: 833512674k total, 1008336k used, 100161288k free, 178414k buffers
Swap: 19426824k total, 0k used, 12430010k free, 103610k cached

Using vmstat to find out the RAM

You can also use the vmstat command with -s switch to list out the memory details.

vmstat -s
READ More Relevant Stuff:  Top 5+Best Linux Port Scanners For Network Admins In 2023

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply

    Your email address will not be published. Required fields are marked *