Sorry, you have been blocked
This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.
What can I do to resolve this?
You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.
Cloudflare Ray ID: 8038e1394e71b9e7 • Your IP: Click to reveal 178.175.133.149 • Performance & security by Cloudflare
How to check RAM size?
What is the command to find the RAM size in computer? I want to see result in MB.
4 Answers 4
From a terminal you should be able to use:
-m , —mebi Display the amount of memory in mebibytes.
—mega Display the amount of memory in megabytes. Implies —si .
Open a terminal ( CTRL + ALT + T ).
Run following command to see RAM information in KB (1 KB is equal to 1024 bytes).
Run following command to see RAM information in MB (1 MB is equal to 1024 KB).
Run following command to see RAM information in GB (1 GB is equal to 1024 MB).
Or you can run following command to see more information about the same:
![]()
Click on the power/gear icon (System Menu) in the top right corner of the screen and choose About This Computer. You will see the total available memory in GiB. Multiply the value by 1024 to get the size in MiB.
This value (and the value shown as Total in output of free -m on the console), is total physical RAM size, minus the amount assigned to the internal GPU, if your computer has one.
To see the total amount of physical RAM installed, you can run sudo lshw -c memory which will show you each individual bank of RAM you have installed, as well as the total size for the System Memory. This will likely presented as GiB value, which you can again multiply by 1024 to get the MiB value.
Информация об оперативной памяти в Linux. Свободная, занятая и тип памяти

Мы воспользуемся утилитами командной строки доступными для большинства Linux дистрибутивов.
Свободная и занятая оперативная память
Для получения информации о количестве свободной и занятой оперативной памяти в Linux можно использовать различные утилиты и команды. Рассмотрим несколько распространенных способов.
Команда free
Команда free очень простая, она выводит информацию о общем количестве оперативной памяти, о количестве занятой и свободной памяти, а также об использовании файла подкачки.
По умолчанию объем памяти выводится в килобайтах. Используя опции, можно выводить объем памяти в других форматах. Некоторые опции:
- -m — в мегабайтах
- -g — в гигабайтах
- -h — автоматически определить формат

Команда vmstat
Команда vmstat выводит различную статистику по использованию памяти. Используя ключ -s можно вывести подробную статистику в табличном виде.

Команда top
top — это утилита командной строки, которая используется для мониторинга процессов и используемых ресурсов компьютера.
Запуск утилиты top :
В заголовке выводится информация об использованной оперативной памяти.

Команда htop
Утилита htop, также как и top, используется для мониторинга ресурсов и процессов.
Для установки утилиты htop в Ubuntu Linux (Linux Mint и других Ubuntu/Debian-дистрибутивах) выполните команду:
Запуск утилиты htop :

Файл /proc/meminfo
Описанные выше команды, в качестве источника информации используют системные файлы из файлов, хранящихся в виртуальной файловой системе /proc . В файле /proc/meminfo содержится информация об использовании памяти. Выведем содержимое файла /proc/meminfo :

Тип памяти и частота
Рассмотрим, как получить информацию об установленных в компьютер модулях оперативной памяти. Воспользуемся командной dmidecode
Используем следующую команду:
В выводе команды будет информация о слотах оперативной памяти. Для каждого слота отображается установленный модуль оперативной памяти, его тип (поле Type ), размер (поле Size ), скорость/частота (поле Speed ) и другая информация.
В зависимости от системы и оборудования не всегда удается получить все данные, поэтому некоторые поля могут быть пустыми или иметь надписи Not provided/Unknown.
Заключение
Мы рассмотрели различные способы для просмотра информации о доступной и занятой оперативной памяти, а также показали, как вывести информацию об установленных модулях оперативной памяти.
Для отслеживания использования ресурсов компьютера существует множество графических программ. Найти их можно в нашем каталоге программ для Linux в разделе Система/Мониторинг.
Basic System Commands to get CPU, Memory, and Storage details in Linux
![]()
This article will teach you how to get CPU, Memory, and storage details using Linux shell commands.
Let’s get started.
Overview of core components of a computer
A computer is any machine that can be programmed to carry out a set of algorithms and arithmetic instructions.
Whether it’s a gaming system or a home PC, the five main components that make up a typical, present-day computer include:
You can also check the complete udemy course (Linux Shell Commands for Absolute Beginners using Ubuntu 20x)Referral link
A motherboard
A Central Processing Unit (CPU)
A Graphics Processing Unit (GPU), also known as a video card
Random Access Memory (RAM), also known as volatile memory
Storage: Solid State Drive (SSD) or Hard Disk Drive (HDD)
Get CPU Details using lscpu command in Linux
lscpu is an essential command in Linux to learn about your CPU configuration. You can get more details about lscpu by running lscpu —help .
A command-line utility “lscpu” in Linux is used to get CPU information of the system. The “lscpu” command fetches the CPU architecture information from the “sysfs” and /proc/cpuinfo files and displays it in a terminal.
Get Memory Details using free on Linux
The Linux free command is used to get the full usage of RAM in the computer. You can get the full details of free command by running free —help .
the free command can be used with the control arguments as shown in the below picture.
This is what the output to the free command looks like in the Linux terminal.
If you want the human-readable output of the free command you can use -h the control argument along with the free .
Get Storage Details using df in Linux
The df command in Linux is used to Show information about the file system on which each FILE resides, or all file systems by default. In layman’s terms, program df aids in the retrieval of data from any hard disc or mounted device, including CD, DVD, and flash drives.
You can get the full usage details of the df command by running the following command in the Linux terminal
If you want the output in Human readable format you can use df -h command on Linux.
If you want the storage details of the current working directory in the human-readable format you can run the following command in Linux. Here . represents the current working directory.
Get Disk Usage Details using du in Linux
The du command in Linux is used to get the disk usage. And this du command will go through each and every folder recursively and get the storage details of each and every file.
In simple words the du command will Summarize disk usage of the set of files, recursively for directories. You can get the full details of the du command by running du —help .
The output of the du command will look something like the below image.
If you want only the details of the storage at the folder level without going recursively through each and every folder to get the details of the file. Then you can use the following command in Linux.
The output will look something like the following
Get the largest folders and files using du and sort on Linux
You can use du command with sort command to troubleshoot the file which is using the highest storage in the Linux file system. The way in which you can do this is by the piping output of du command to the sort command.
The output of the above file will look something like this
Understand Storage Details of Directories using du on Windows
The detailed explanation of the Storage Details of Directories using du on Windows is in the following video time stamp.
Get storage use of folders and files
You can get the storage usage of files and folders in the Linux terminal by running the following command
When you run into permission-related issues while running the above command in the Linux terminal. You can use the following command to ignore the operation not permitted message.
The output will be displayed without permission-related errors.
You can pipe the above output to the sort command to sort the output in ascending order.
Get Storage Details of larger files using find and du
You can use the find command along with du the command to get the larger file details.
You can also sort the output by the piping sort -n command to the above command.
This is how you can troubleshoot the files and folders which are consuming more amount of storage in your Linux system.
Thank you, for reading the article. If you find it valuable please follow our publication DevOps Engineering on Cloud
You can also check the complete udemy course (Linux Shell Commands for Absolute Beginners using Ubuntu 20x)Referral link