In Ubuntu (and Linux in general), “free” refers to the amount of unused RAM (Random Access Memory) available on your system, which you can check using the “free” command in the terminal; essentially, it shows how much memory is not currently being used by running applications.
free
To display the results in human readable format add the option -h
free -h
To display the results in human readable and total add the option –total
free -h –total
In Ubuntu, “top” command is used to show the Linux processes. It provides a dynamic real-time view of the running system. Usually, this command shows the summary information of the system and the list of processes or threads which are currently managed by the Linux Kernel.
top
To sort the output by the highest Memory consume command use
top -o +%MEM
To sort the output by the highest CPU consume command use
top -o +%CPU