How can I check the size of physical memory in Linux?

You can use the following command to view the size of the physical memory:

  1. at no cost
free -h

This command will display the total, used, and available physical memory.

  1. feline
  2. The memory information file in the /proc directory.
cat /proc/meminfo

In the output, you can view information such as the total amount of physical memory and the available amount.

  1. Obtain system information
sudo dmidecode -t memory | grep Size

This command will display detailed information about the physical memory, including the size of each memory slot.

Note: The dmidecode command needs to be run with root privileges.

bannerAds