How do I get rid of the deprecated error in ps?

How do I get rid of the deprecated error in ps?


Author: Aaron Turner
Email: aturner@pobox.com
Web Page: http://www.pobox.com/~aturner/

System Architecture: intel
RedHat Release: 5.1
FAQ Category: Error Messages
Modification Date: Sep 26, 1998

Question:

Newer versions of ps no longer require the "-" to denote arguments.  Hence
when you run ps -aux you get the following error:
warning: `-' deprecated; use `ps aux', not `ps -aux'

Answer:

In your ~/.bash_profile (for per user) or /etc/profile (for system) add the
following lines:

I_WANT_A_BROKEN_PS=1
export I_WANT_A_BROKEN_PS 

Be sure to see the man page for ps for details.

References:

man ps