how to show the top n process in terminal consuming memory in linux code example Example: check the linux process top 10 # ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head