dmidecode
The dmidecode command reads the system DMI table to display hardware and BIOS information of the system. This command will give you information on the current configuration of your system, as well as the system’s maximum supported configuration.</p>
can also use grep with dmidecode to check how much RAM my system will support, as follows:
# dmidecode -t memory | grep -i Maximum
Maximum Capacity: 4GB
for more details check out MAN page.</div>