Find the process ID number of the process with the specified name
pidof command is used to find the process ID number of the process with the specified name.
pidof(option)(parameter)
-s: only returns a process number;
-c: Only show processes with the same "root" directory;
-x: Display processes started by scripts;
-o: Specify the process ID not to be displayed.
Process name: Specify the name of the process to find.
pidof nginx
13312 5371
pidof crond
1509
pidof init
1