Читать книгу Kali Linux Penetration Testing Bible - Gus Khawaja - Страница 55

Process Management

Оглавление

One of my favorite terminal window tools to list all the running processes on Kali is called htop . By default, it's not installed on Kali, so to install it, we use the apt install command:

root@kali:/# apt install htop -y Reading package lists… Done Building dependency tree Reading state information… Done

Once it's installed, you can run the htop command:

$htop

As you can see in Figure 1.15, we're running Nmap in another terminal window, and it has a process ID (PID) equal to 1338.


Figure 1.15 HTOP

Another way to get the list of currently running processes is by using the ps command:

$ps -Au -A: To select all the processes (if you want to list only the processes that belongs to the current user then use the -x option instead) -u: shows more info (e.g., CPU, MEM, etc) than the default output

To kill a process, you will need to identify its PID first; then you can use the kill command to get the job done:

$kill [PID]

If the system doesn't allow you to kill it, then you must force it to close using the ‐9 switch:

$kill -9 [PID]

Kali Linux Penetration Testing Bible

Подняться наверх