To find out the maximum RAM capacity and the number of RAM slots available, use the following command:
sudo dmidecode -t 16
The output should look something like this:
# dmidecode 2.11 SMBIOS 2.6 present. Handle 0x0032, DMI type 16, 15 bytes Physical Memory Array Location: System Board Or Motherboard Use: System Memory Error Correction Type: None Maximum Capacity: 16 GB Error Information Handle: Not Provided Number Of Devices: 4
The “Maximum Capacity” is the maximum RAM supported by your system, while “Number of Devices” is the number of memory DIMM slots available on your computer.