How do I get the path of a process in Unix / Linux

后端 未结 11 591
无人共我
无人共我 2020-12-02 04:31

In Windows environment there is an API to obtain the path which is running a process. Is there something similar in Unix / Linux?

Or is there some other way to do th

11条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-02 04:49

    You can find the exe easily by these ways, just try it yourself.

    • ll /proc//exe
    • pwdx
    • lsof -p | grep cwd

提交回复
热议问题