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?

  • none of these answers have yet worked, thank you
    – John
    Nov 28, 2012 at 7:02

5 Answers 5


On ubuntu you can use the handy bash-completion featuere to programmaticly list what commands are available to you as a user (provided you know what letters the command start with, in your case netbean it would be netb)

So open a terminal and then type the first couple letters of the application like so: netb

Then hit the tab key for a list of commands available to you

you should see the executable for neatbeans in there.


Graphical programs such as NetBeans can be opened by searching in the Dash, regardless of how they were installed. If you have installed a command line program, you can usually run it by just typing the program's name into the terminal. For example, after installing the text editor vim, you can run it by simply typing vim into a terminal and pressing Enter.

Usually, you will not need to know the path a program is installed to. However, you can see it by typing which <command name> into a terminal. For example, to find out where apt-get is installed to, run the command which apt-get.

  • that is easy, i want to also be able to do it by command line
    – John
    Nov 28, 2012 at 7:02

One way you can check this is to read through the list of files installed by the package and look for executables. Assuming the package is called netbeans, you can run this in the terminal:

dpkg -L netbeans | grep bin

One of the lines in the output should be:


Since /usr/bin should be in your $PATH, that means you can run it by typing netbeans in a terminal.

Other uses for the dpkg -L flag are finding where the logs or configuration files are kept. This will work whether you installed using apt-get, dpkg, or the software-center.

  • +1, probably the best and easiest way of doing so
    – MiJyn
    Nov 28, 2012 at 18:33

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.


Most programs/command can be accessed from anywhere; you don't need to figure out the path.

In case you still need or want to know the path, use which as stated in the answer above.

As for the name, try netbeans and see if that works.

As for the available command-line options (assuming the above command works) try netbeans --help

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.