Use the ps command as follows:
ps -ef | grep shutdown
Among them, shutdown is the shutdown command, but at this time, only the relative path is viewed, and there is no absolute path, such as:
Among them, 4170 is the process ID. At this time, enter [/proc/4170] and view it through ls -al as follows:
ls -al / proc / 4170
Notice:
- The cwd symbolic link is the process running directory;
- The exe symbolic link is the absolute path to the executable program;
- cmdline is the command line command entered when the program is running;
- environ records the environment variables when the process is running;
- Under the fd directory are symbolic links to files opened or used by processes.
refer to:
Use the ps command as follows:
ps -ef | grep shutdown
Among them, shutdown is the shutdown command, but at this time, only the relative path is viewed, and there is no absolute path, such as:
Among them, 4170 is the process ID. At this time, enter [/proc/4170] and view it through ls -al as follows:
ls -al / proc / 4170
Notice:
- The cwd symbolic link is the process running directory;
- The exe symbolic link is the absolute path to the executable program;
- cmdline is the command line command entered when the program is running;
- environ records the environment variables when the process is running;
- Under the fd directory are symbolic links to files opened or used by processes.
refer to: