{"id":22639,"date":"2023-10-27T17:33:52","date_gmt":"2023-10-27T17:33:52","guid":{"rendered":"https:\/\/linuxways.net\/?p=22639"},"modified":"2023-10-27T17:33:52","modified_gmt":"2023-10-27T17:33:52","slug":"how-to-check-total-ram-on-ubuntu-22-04","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/ubuntu\/how-to-check-total-ram-on-ubuntu-22-04\/","title":{"rendered":"How to Check Total RAM on Ubuntu 22.04?"},"content":{"rendered":"<p><strong>RAM <\/strong>or Random Access Memory is used for short-term memory, i.e. it temporarily stores data. RAM works simultaneously with the CPU for better performance as it can transfer data faster and one can also write data faster to it. RAM Memory Management is also of great importance for the overall performance of the Ubuntu System.<\/p>\n<p>This article discusses multiple methods of checking the Total RAM on Ubuntu 22.04.<\/p>\n<h2><strong>How to Check Total RAM on Ubuntu 22.04?<\/strong><\/h2>\n<p>The RAM Details usually contain Information about the Total RAM Memory, RAM Memory in use, and the RAM Memory Cached or Available. The System Monitor Application through GUI can be used to display the RAM Details and apart from that, Multiple Methods with Commands can also be used to display the RAM Details. These Methods are:<\/p>\n<ul>\n<li>Check Total RAM using the \u201cfree\u201d Command.<\/li>\n<li>Check Total RAM using the \u201cvmstat\u201d Command.<\/li>\n<li>Retrieve RAM Details from \u201cmeminfo\u201d File.<\/li>\n<li>Check Total RAM using the \u201ctop\u201d Command.<\/li>\n<li>Check Total RAM using the \u201chtop\u201d Command.<\/li>\n<li>Check Total RAM using the \u201cdmidecode\u201d Command.<\/li>\n<li>Check the Total RAM Using the System Monitor.<\/li>\n<\/ul>\n<h2><strong>Method 1: Check Total RAM on Ubuntu 22.04 Using the \u201cfree\u201d Command<\/strong><\/h2>\n<p>The \u201cfree\u201d Command in Ubuntu displays the RAM Memory Details including the RAM total memory, the used memory, the free memory, the shared RAM, the cached memory, and the available RAM. The \u201cfree\u201d command to list RAM details is:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">free<\/span> <span class=\"re5\">-m<\/span><\/div><\/div>\n<p>The \u201cMem\u201d Row displays the RAM Details in MegaBytes (MB) in Terminal:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"986\" height=\"168\" class=\"wp-image-22640\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-1.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-1.png 986w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-1-300x51.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-1-768x131.png 768w\" sizes=\"auto, (max-width: 986px) 100vw, 986px\" \/><\/p>\n<p>To display the RAM Details with \u201cGi\u201d for GigaBytes and \u201cMi\u201d for MegaBytes, the \u201c-h\u201d option is used with the \u201cfree\u201d command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">free<\/span> <span class=\"re5\">-h<\/span><\/div><\/div>\n<p>The \u201cGi\u201d and the \u201cMi\u201d represent the respective RAM Memory in the Terminal:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"950\" height=\"101\" class=\"wp-image-22641\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-2.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-2.png 950w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-2-300x32.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-2-768x82.png 768w\" sizes=\"auto, (max-width: 950px) 100vw, 950px\" \/><\/p>\n<p>As the resources in our Ubuntu System consume the RAM Memory every millisecond, the RAM usage and available Memory changes accordingly. The \u201cfree\u201d command can also be used along with the \u201cwatch\u201d Command to display the RAM Details in real-time:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">watch<\/span> <span class=\"kw2\">free<\/span><\/div><\/div>\n<p>It changes the details every 2 seconds making it easier for you to track the memory usage more accurately:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"957\" height=\"256\" class=\"wp-image-22642\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-3.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-3.png 957w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-3-300x80.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-3-768x205.png 768w\" sizes=\"auto, (max-width: 957px) 100vw, 957px\" \/><\/p>\n<h2><strong>Method 2: Check Total RAM on Ubuntu 22.04 Using the \u201cvmstat\u201d Command<\/strong><\/h2>\n<p>The \u201cvmstat\u201d command displays the Kernel Threads details. It lists the memory information, running processes, disk details, and many others. To Check the total RAM on your Ubuntu System, the \u201cvmstat\u201d command will be used:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">vmstat<\/span> <span class=\"re5\">-s<\/span><\/div><\/div>\n<p>The \u201c-s\u201d option filters the details to only display a quick overview of Memory Usage:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"992\" height=\"565\" class=\"wp-image-22643\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-4.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-4.png 992w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-4-300x171.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-4-768x437.png 768w\" sizes=\"auto, (max-width: 992px) 100vw, 992px\" \/><\/p>\n<h2><strong>Method 3: Check the Total RAM on Ubuntu 22.04 with the \u201cmeminfo\u201d File<\/strong><\/h2>\n<p>The \u201cmeminfo\u201d file contains the Memory Information of your Ubuntu System. To get and display the content inside the \u201cmeminfo\u201d file, the \u201ccat\u201d command is used along with the path to the \u201cmeminfo\u201d file:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">cat<\/span> <span class=\"sy0\">\/<\/span>proc<span class=\"sy0\">\/<\/span>meminfo<\/div><\/div>\n<p>The \u201cMemTotal\u201d displays the Total RAM Memory in Bytes, the \u201cMemFree\u201d displays the Free RAM Memory available in Bytes, and the other RAM Details are also displayed in the Terminal:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"432\" class=\"wp-image-22644\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-5.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-5.png 1000w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-5-300x130.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-5-768x332.png 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<h2><strong>Method 4: Check Total RAM on Ubuntu 22.04 Using the \u201ctop\u201d Command<\/strong><\/h2>\n<p>Just like the Windows Operating System has the Task Manager, the Ubuntu Operating System lists the tasks and processes with the \u201ctop\u201d command. The RAM Usage by the processes is also displayed by the Top Command. The top command can simply be used by typing the \u201ctop\u201d command in the Terminal:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">top<\/div><\/div>\n<p>At the top of the Statistical Information, the \u201cMiB Mem\u201d displays the RAM Information that includes the Total RAM Memory in MBs, the Free RAM Memory in MBs, the Used RAM Memory in MBs, and the Cached RAM Memory in MBs:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"991\" height=\"681\" class=\"wp-image-22645\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-6.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-6.png 991w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-6-300x206.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-6-768x528.png 768w\" sizes=\"auto, (max-width: 991px) 100vw, 991px\" \/><\/p>\n<h2><strong>Method 5: Check the Total RAM on Ubuntu 22.04 Using the \u201chtop\u201d Command<\/strong><\/h2>\n<p>The \u201chtop\u201d command is like the top command but it is more visually appealing to the users. With the \u201chtop\u201d command, in the processes list, a user can scroll vertically and horizontally unlike the \u201ctop\u201d command where the user is restricted to viewing only one page on the Terminal. A user can even select a process from the \u201chtop\u201d processes list.<\/p>\n<p>The \u201chtop\u201d command is not pre-installed in Ubuntu. To install the \u201chtop\u201d command, first, you need to update and upgrade the existing Ubuntu Packages with the following \u201csudo\u201d command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">apt-get update<\/span> <span class=\"sy0\">&amp;&amp;<\/span> <span class=\"kw2\">sudo<\/span> <span class=\"kw2\">apt-get upgrade<\/span><\/div><\/div>\n<p>This will update and upgrade any packages that require an update:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"952\" height=\"485\" class=\"wp-image-22646\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-7.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-7.png 952w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-7-300x153.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-7-768x391.png 768w\" sizes=\"auto, (max-width: 952px) 100vw, 952px\" \/><\/p>\n<p>Once the packages are upgraded, install the \u201chtop\u201d utility with the below-given command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> apt <span class=\"kw2\">install<\/span> <span class=\"kw2\">htop<\/span><\/div><\/div>\n<p>It will start installing the \u201chtop\u201d packages, wait for the installation process to complete:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"952\" height=\"491\" class=\"wp-image-22647\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-8.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-8.png 952w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-8-300x155.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-8-768x396.png 768w\" sizes=\"auto, (max-width: 952px) 100vw, 952px\" \/><\/p>\n<p>The installation when completed will add the \u201chtop\u201d utility to your Ubuntu System and can be used in the Terminal directly using the following snippet:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">htop<\/span><\/div><\/div>\n<p>The information about Processes and Resources used can be seen in the Terminal in a more visually appealing way. A process can also be selected by just clicking on it. The \u201cMem\u201d bar displays the total RAM Memory and the currently in use RAM Memory:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"956\" height=\"522\" class=\"wp-image-22648\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-9.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-9.png 956w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-9-300x164.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-9-768x419.png 768w\" sizes=\"auto, (max-width: 956px) 100vw, 956px\" \/><\/p>\n<h2><strong>Method 6: Check the Total RAM on Ubuntu 22.04 Through the RAM Type Details<\/strong><\/h2>\n<p>The RAM Type Details can be checked with the \u201cdmidecode &#8211;type memory\u201d. This command retrieves Information about the System Hardware which includes Processor, RAM, and BIOS. The command to retrieve the RAM Details is stated in the following code block:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> dmidecode <span class=\"re5\">--type<\/span> memory <span class=\"sy0\">|<\/span> <span class=\"kw2\">less<\/span><\/div><\/div>\n<p>The Terminal will list the Memory Module that is currently in use. In our case, it displays the RAM Details where we can see the Maximum Memory Size and the Minimum Memory Size:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"730\" height=\"481\" class=\"wp-image-22649\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-10.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-10.png 730w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-10-300x198.png 300w\" sizes=\"auto, (max-width: 730px) 100vw, 730px\" \/><\/p>\n<h2><strong>Method 7: Check the Total RAM on Ubuntu 22.04 Through the System Monitor<\/strong><\/h2>\n<p>Instead of using only the Terminal to check the RAM Details, the System Monitor through the GUI Method can also be used to check the Total RAM. To open System Monitor, click on the \u201cNavigation Menu\u201d:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1920\" height=\"1080\" class=\"wp-image-22650\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-11.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-11.png 1920w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-11-300x169.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-11-1024x576.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-11-768x432.png 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-11-1536x864.png 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<p>You can either use the Search Box to search for \u201cSystem Monitor\u201d or you can manually look for the System Monitor in the Applications. Select the System Monitor Icon to start the System Monitor Application:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1510\" height=\"901\" class=\"wp-image-22651\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-12.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-12.png 1510w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-12-300x179.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-12-1024x611.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-12-768x458.png 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-12-501x300.png 501w\" sizes=\"auto, (max-width: 1510px) 100vw, 1510px\" \/><\/p>\n<p>The System Monitor starts and you can see the List of Running Applications on your Ubuntu System. You can also see the resources those processes are utilizing. In the Navigation Menu, click on the \u201cResources\u201d Option:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"701\" height=\"501\" class=\"wp-image-22652\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-13.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-13.png 701w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-13-300x214.png 300w\" sizes=\"auto, (max-width: 701px) 100vw, 701px\" \/><\/p>\n<p>The Resources Menu will display the resources and memory usage of RAM, CPU, and Network separately. In the following Memory Graph, you can see the total memory of RAM, in our case, the Total RAM is 8.3GB:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"701\" height=\"500\" class=\"wp-image-22653\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-14.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-14.png 701w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/10\/word-image-22639-14-300x214.png 300w\" sizes=\"auto, (max-width: 701px) 100vw, 701px\" \/><\/p>\n<p>That\u2019s all about checking the total RAM on Ubuntu 22.04.<\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>To check the RAM on Ubuntu, either of the \u201cfree\u201d, \u201cvmstat\u201d, \u201cmeminfo\u201d, \u201ctop\u201d, \u201chtop\u201d, or \u201cdmidecode\u201d commands can be used in the Terminal. To check the RAM through GUI, the System Monitor Application can be used. This article explained each command in detail along with the process of finding total RAM through the GUI.<\/p>","protected":false},"excerpt":{"rendered":"<p>Total RAM can be checked through either of the \u201cfree\u201d, \u201cvmstat\u201d, \u201cmeminfo\u201d, \u201ctop\u201d, \u201chtop\u201d, \u201cdmidecode\u201d commands or through the System Monitor Application.<\/p>","protected":false},"author":110,"featured_media":22654,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-22639","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/22639","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/110"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=22639"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/22639\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/22654"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=22639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=22639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=22639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}