How to change argv0 in bash so command shows up with different name in ps?

bstpierre picture bstpierre · Jul 15, 2010 · Viewed 19.3k times · Source

In a C program I can write argv[0] and the new name shows up in a ps listing.

How can I do this in bash?

Answer

Ignacio Vazquez-Abrams picture Ignacio Vazquez-Abrams · Jul 15, 2010

You can do it when running a new program via exec -a <newname>.