DISCLAIMER : Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility.If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.


Single command to find out RAM(memory) size in Linux

You can use the command cat /proc/meminfo to get the memory details in the linux operating system.
But this gives much more information of memory.
If you need just the memory size , use the below command to get that.


cat /proc/meminfo | awk 'match($1,"MemTotal") == 1 {print $2}'

This gives the memory size in kilobytes(kb).
But I don't know if the format of /proc/meminfo varies among distribution.

 

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.