how to get ram in linux code example Example 1: how to get ram detail in linux sudo dmidecode --type 17 Example 2: Ram usage in linux $ cat /proc/meminfo