This question is covered here in great detail.
How do you measure the memory usage of an application or process in Linux?
From the blog articl
$ sudo apt-get update $ sudo apt-get install htop
$ htop