This is a very informative command because it shows the number of empty RAM slots, the number of RAM slots that have RAM sticks installed and the size of each installed RAM stick.
The command to show the size of each of the installed RAM sticks is: sudo dmidecode -type 17 | grep -i size
The results of this command will be one integer number equal to the number of RAM slots. The number of memory devices in the results of sudo dmidecode -type 17 is equal to the number of memory slots, so the command to print the number of RAM slots is: sudo dmidecode -type 17 | grep 'Memory Device' -count Or sudo dmidecode | grep -i 'Maximum Capacity:' | uniqĮDIT: more interactive way to see Slot use small script (suggested by Serg) sudo lshw -class memory | awk '/bank/ ' In other slots you can see it shows empty.įor maximum supportable memory use: sudo dmidecode -t 16 Here in my system I have 4 memory slots in which currently I am using only one slot. It will give you an output like this: *-memoryĭescription: SODIMM DDR3 Synchronous 1333 MHz (0.8 ns)
You can use this command: sudo lshw -class memory