Skip to main content
No. of Recommendations: 0
"Do you know the whereis command, then?"

On most systems, the commands whereis and which are simply aliases to "type", a bash built-in shell command. This is useful to know when you work on SCO or Solaris and simply have bash, without the default linux bashrc and bash_profile files.

These only search your current $PATH, too. If you su to root (very likely, if you are telnet/ssh'ing in, since remote root logins SHOULD be disabled), the $PATH var will be the users path. Try "su -". "su -" switches users AND runs their login scripts. "su - ronelson", for instance, switches to ronelson and runs his login scripts. This is great when a user on your system calls and tells you something isn't working. Since you are root, you don't need to ask for their password. Great when their login scripts put them in a menu that pulls info based on the login name.

Rob Nelson
Print the post  


What was Your Dumbest Investment?
Share it with us -- and learn from others' stories of flubs.
When Life Gives You Lemons
We all have had hardships and made poor decisions. The important thing is how we respond and grow. Read the story of a Fool who started from nothing, and looks to gain everything.
Contact Us
Contact Customer Service and other Fool departments here.
Work for Fools?
Winner of the Washingtonian great places to work, and Glassdoor #1 Company to Work For 2015! Have access to all of TMF's online and email products for FREE, and be paid for your contributions to TMF! Click the link and start your Fool career.