 <p>In general, don't pass sensitive information on the command line. Pass it in environment variables*, or in the content of a file, or pipe it in via a file descriptor.</p> <p>It is possible to modify the command line after a program starts (by overwriting the memory pointed to by argv[1]), but this leaves a window of vulnerability between when the program starts and when its arguments are erased. You cannot avoid this in general. So don't use program command line arguments for any sensitive data.</p> <p>* - The security of environment variables may vary between unixes. On Linux it should be safe - if you have the ability to read env variables, you also have the ability to read process memory directly.</p>