In the image below we used the command top
which automatically sorts by CPU usage
In the image below we used the command htop
and F6
to sort by memory usage.
In this image, we used the top
command, then I used the command o
then I typed in the following PID, %CPU, %MEM
to sort by PID CPU usage and Memory usage.
![image](https://private-user-images.githubusercontent.com/137829671/284080826-7889002c-7b76-43a3-891d-5924c51dd206.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1OTc4NzQsIm5iZiI6MTczOTU5NzU3NCwicGF0aCI6Ii8xMzc4Mjk2NzEvMjg0MDgwODI2LTc4ODkwMDJjLTdiNzYtNDNhMy04OTFkLTU5MjRjNTFkZDIwNi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNVQwNTMyNTRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jZmVkNmJjMTk1ZmQ4OTVlYWQyN2E5MzM5OGE2MGIyMDBmMTNmN2Y2NDc4OGYwMjQ3ZGYwNmNlMjZmMTM1NzEyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.gKYSzVQKrajRxSbNw1YUH9_j0Czuui3NdkNQWKy9FIQ)
Closing a process in htop
is simple. You select the process you want to close and then you type the command F9
. Then the side menu will come up and you will select sigkill
to kill the process.