[Linux] Linux system (process management) and linux System Process Management
Process: When we run a program, Linux creates a special environment for the program, including all the resources for running the program. This environment is called a process.
Foreground process: Generally, some commands belong to the foreground process and the result is directly output to the display.
Background process: Add & at the end of the command to create the simplest background process
Resident Process: system-level process that runs on the background with root permission and can process requests from other processes
Orphan process: after killing the parent process, the child process becomes an orphan process without the father, and the init process becomes their father.
Zombie process: the process is suspended. The ps command also shows that we can kill the botnet by killing their parent process.
Run the command ps to view the running process. The parameter is-f (full all information)-aux (view all processes in the memory)
For example:
UID PID PPID C STIME TTY TIME CMD
Root 1562 1559 0 00:00:00 pts/0-bash
Root 1586 1562 1 00:00:00 pts/0 ps-f
Use the top command to dynamically view running processes
PID is the process id, PPID is the parent process id, most commands run by the user use Shell as the parent process id
Run the command kill to kill the process. The parameter is pid.