Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to find out for any given process with which parameters it was started?

share|improve this question
up vote 5 down vote accepted

To find what arguments were passed to pdnsd, I'd do:

[~]> pgrep -l pdnsd
1373 pdnsd
[~]> cat /proc/1373/cmdline 

(cmdline file entries are separated by null characters; use something like tr '\0' '\n' </proc/<pid>/cmdline to see more legible output.)

/proc/<pid>/ contains a lot of information.

share|improve this answer
Note that the command line can be overwritten by the program itself; certain pieces of software do this for benign reasons, usually to put useful human-readable information in the ps output, but also malign reasons like an exploit or rootkit trying to hide itself. – Shadur Jun 8 '11 at 9:56

For Linux, ps -ef yields the whole command line including the parameters.

For Solaris, things could be more problematic but you tagged the question with Linux...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.