How to view the path of a running process in Linux?
You can use the command ps -ef to view information about the processes running, including the path of each process. You can obtain the path information of a process by checking the COMMAND column.
Execute the following command to view the paths of the running processes:
ps -ef | grep <进程名称>
Replace
ps -ef | grep apache2
This will display all process information containing the keyword apache2 and show the path of each process.