Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I find out how much ram my computer has? I am running Ubuntu 13.04.

share|improve this question
    
Note for many solutions it will only tell you how RAM the OS can 'see' (e.g. 32bit without PAE can only see 4GB) – Wilf May 16 '15 at 21:16
up vote 19 down vote accepted

If you click on the gear icon (top right of your screen) then click on About this computer. The RAM is the 2nd entry down, below the computer name.

Edit

if you run sudo lshw -class memory in your terminal, this gives you the details of all available memory.

share|improve this answer
3  
That will tell you how much RAM the OS can see. – david6 Jun 1 '13 at 1:00
    
Also, to print just the amount in MiB: lshw -C memory 2>/dev/null | grep -Po ' +size: \K.*' – kos Dec 3 '15 at 15:34

Also easy to use commands to check RAM:

free -lm

Using top command itself or:

top | grep -i mem

Similar to top but a bit more advanced is htop but the package has to be installed sudo apt-get install htop then run:

htop

Will output memory scale in terminal.

Also vmstat can do this:

vmstat -s -SM
share|improve this answer

Good way to check is to reference /proc/meminfo file. Most tools such as free, top, htop all use that file.

There's many lines there showing different statistics, but using AWK, we can filter out the totals. MemTotal line will show you the RAM. As a bonus, I've included total Swap as well.

$ awk '/MemTotal/ || /SwapTotal/' /proc/meminfo                                
MemTotal:        1789444 kB
SwapTotal:        524284 k
share|improve this answer

Open a terminal: CtrlAltT)

Type: sudo lshw

share|improve this answer
  1. Open System Settings.

  2. Click Details at the bottom of the panel.

  3. You will see details about your PC (such as RAM).

share|improve this answer

I like the output that sudo dmidecode -t 17 gives. Here's what it says about my machine:

# dmidecode 2.12
# SMBIOS entry point at 0x000f0480
SMBIOS 2.7 present.

Handle 0x0009, DMI type 17, 34 bytes
Memory Device
    Array Handle: 0x0007
    Error Information Handle: Not Provided
    Total Width: 64 bits
    Data Width: 64 bits
    Size: 4096 MB
    Form Factor: DIMM
    Set: None
    Locator: A1_DIMM0
    Bank Locator: A1_BANK0
    Type: DDR3
    Type Detail: Synchronous
    Speed: 1333 MHz
    Manufacturer: Undefined       
    Serial Number: 000001D2  
    Asset Tag: A1_AssetTagNum0
    Part Number: SLA302G08-EDJ1C   
    Rank: 2
    Configured Clock Speed: Unknown

Handle 0x000D, DMI type 17, 34 bytes
Memory Device
    Array Handle: 0x0007
    Error Information Handle: Not Provided
    Total Width: 64 bits
    Data Width: 64 bits
    Size: 4096 MB
    Form Factor: DIMM
    Set: None
    Locator: A1_DIMM2
    Bank Locator: A1_BANK2
    Type: DDR3
    Type Detail: Synchronous
    Speed: 1333 MHz
    Manufacturer: Undefined       
    Serial Number: 0000017F  
    Asset Tag: A1_AssetTagNum2
    Part Number: SLA302G08-EDJ1C   
    Rank: 2
    Configured Clock Speed: 2 MHz

I like the fact that it gives you a simple human-readable description of how much RAM is in each slot - 2 x Size: 4096 MB in the example above (so I have 8GB RAM total). And that it breaks it down by slot, so you have a bit more idea about what your upgrade options are.

dmidecode (man page) tells you about your system's hardware. Specifying -t 17 filters by the "Memory Device" type.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.