Ubuntu – how to figure out command to launch a program from terminal

command line

I want to figure out how to open a program after i install it in terminal. I do it with programs all the time, but i don't know how to find out after I install a program what command to run, what file path the everything is in or any thing like that. The program i am trying to figure out how to open from terminal right now is NetBeans IDE 7.2.1 , but i don't just want to understand how to open it, i want to understand how to find out where to go after i install it, whether i have installed it with apt-get or if i used dpkg?

Best Answer

Install your program and then before you use a search tool like locate, you must run

sudo updatedb

to refresh the database or you will not find your just installed program with locate.

Now you will usually be able to use the name of the program you just installed (e.g. shutter) and run locate shutter, for example, to find all the installed shutter files. To specifically find all the executables related to shutter in bin, run

locate shutter | grep bin

Alternatively, to quickly find the locations of the main shutter executable, run which shutter and for a listing of filesystem locations, run whereis shutter.

Related Question