I own a 2010 13" macbook, and I'd like to do a RAM update from 2gb to 4gb. Before I buy brand new 2x2gb ram, I'd like to make sure that my macbook has 2x1gb or 1x2gb ram slots. I mean, if both slots are used or if there's only 1 used. Is there a command line to have that information?
To literally check from the command line, use
$ system_profiler SPMemoryDataType Memory: Memory Slots: ECC: Disabled BANK 0/DIMM0: Size: 4 GB Type: DDR3 Speed: 1067 MHz Status: OK Manufacturer: 0x8394 Part Number: 0x393931363434202839393636343429000000 Serial Number: 0x00000000 BANK 1/DIMM0: Size: 4 GB Type: DDR3 Speed: 1067 MHz Status: OK Manufacturer: 0x8394 Part Number: 0x393931363434202839393636343429000000 Serial Number: 0x00000000
The System Information app has this information (and a lot of other info about your computer). Access it by going to the Apple menu (top left of your screen), selecting About This Mac, and clicking the More Info button.
Fire up the app and click on the Memory tab. You'll get a visual representation of how much memory you have and how it's installed. There is a rectangle for each memory slot, and each rectangle will be labeled "Empty", or with the capacity of the chip inserted.
For even more info, go to File-> System Report.
In the new window that appears, click Memory in the list on the left. It will show you the number of slots and what's in each one. In the below screenshot, there is one empty bank. It's the one with the
If none of yours say empty, you've got something in every slot.
Note that if you have an older version of OS X than Lion, you won't have the visual representation. You can open System Profiler (/Applications/Utilities) and follow the directions from the second half of this answer.
Go to apple menu > About This Mac > More Info and click on "Memory" on the left. That should give you detailed information about your RAM.