@emilia_hackett
To check the amount of RAM (random access memory) on your Ubuntu system using the terminal, you can use the free
command. This command displays information about the amount of free and used memory in the system, as well as the total amount of memory.
To use the free
command, open a terminal by pressing Ctrl + Alt + T
and then type the following command:
1
|
free -h
|
The -h
flag stands for "human-readable," which means that the output will be in a more readable format, showing the sizes of the memory in megabytes (MB) or gigabytes (GB) rather than in bytes.
Here's an example of the output you might see:
1 2 3 |
total used free shared buff/cache available Mem: 7.7G 1.8G 3.6G 21M 2.2G 5.6G Swap: 7.9G 0B 7.9G |
In this example, the system has 7.7 GB of total memory, 1.8 GB of which is currently in use, 3.6 GB is free, and 2.2 GB is being used for buffering and caching. The output also shows the total amount of swap space (7.9 GB) and how much of it is being used (0B).
You can also use the top
command to see the current memory usage on your system. To do this, type the following command in the terminal:
1
|
top
|
This will open an interactive display showing the current resource usage on your system, including the amount of memory being used. Press q
to exit the top
command.
I hope this helps! Let me know if you have any questions.