Subscribe to How-To Geek

Find Path of Application Running on Solaris, Ubuntu, Suse or Redhat Linux

If you have installed multiple versions of an application into your system, you may wonder which command is being run from the command line when you launch it. This is especially useful to figure out the path of php when running on a shared server, as many shared servers have both php4 and php5 installed.

which <commandname>

To find the path of the application, you can use the which command, followed by the executable that you would have run.

Example:

# which svn
/usr/bin/svn

# which php
/usr/local/bin/php

The Geek is the founder of How-To Geek and a geek enthusiast. This article was written on 12/1/06 and tagged with: Solaris, Suse Linux, Ubuntu

Daily Email Updates

You can get our how-to articles in your inbox each day for free. Just enter your name and email below:


Name:
Email:
Similar Articles Featured Wiki Articles
Latest Software Reviews Quick Linux Tips
Geek Arcade Popular Forum Threads

Comments (2)

  1. Sandy

    Thanks for that, I’ve never had the time to sit down and learn everything I should about *nix, WHICH is certainly a command I’ll be using again.

    By the way you could add that it also works on freeBSD.

  2. Jon

    Also useful in tracking down executables is ‘readlink -f’


Leave a Comment




Leave your friendly comment here.

If you have a computer help question, click here to leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Sponsored Links
Getting Started
About How-To Geek
What Is That Process?
svchost.exe
jusched.exe
dwm.exe
ctfmon.exe
wmpnetwk.exe
wmpnscfg.exe
rundll32.exe
wfcrun32.exe
Ipoint.exe
Itype.exe
Wfica32.exe
Mobsync.exe
Cmd.exe
Dpupdchk.exe Adobe_Updater.exe

Copyright © 2006-2009 HowToGeek.com. All Rights Reserved.