sudo lshw -short -C memory
Here is what the above code is Doing:
1. sudo is used to run the command as root.
2. lshw is the command to list hardware.
3. -short is used to display the output in a short format.
4. -C memory is used to display only the memory information.