Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to use some applications shown on the Unity Launcher in a terminal, but I need to know the appropriate command to run them. How can I achieve that?

share|improve this question
Can you please describe your question little bit more! – Basharat Sialvi Apr 27 '12 at 16:27
Thru System Settings, I configured the launcher to auto-hide and to come back when mouse is in the left upper corner. But then I coudn't activate the launcher, and I needed to start the System Settings again to revert it, and I was with terminal open. But how is the command for System Settings (and other items in the launcher)? – Sony Santos Apr 27 '12 at 18:40
up vote 39 down vote accepted

Most default applications will have a .desktop file located in /usr/share/applications.

To find out about the corresponding terminal command that will be run when launching one of these applications open the file browser Nautilus and right click on the application's icon to select Properties in the context menu. This will give you all details you need (shown here for System Settings that will run gnome-control-center -overview)

application launcher properties view

share|improve this answer
Oh, that's exactly what I want! Thank you! – Sony Santos Apr 28 '12 at 10:17

If you installed the application through the repositories or through dpkg, you can use this command:

dpkg -l | grep "application name"

This will search through all your installed applications, as well as search their descriptions; searching the description is the important part here, because the description usually contains the name of the application, even if the "command" to run it does not contain the application name.


In GNOME, there's an application called the Disk Usage Analyzer. However, the command to run it from the terminal is not disk-usage-analyzer. To find out its command, you can run:

dpkg -l | grep "disk usage"

The output should contain this entry:

alaa@aa-lu:~$ dpkg -l | grep "disk usage"
ii  baobab            3.6.4-0ubuntu1          i386         GNOME disk usage analyzer

Look at the second column. The command to actually run the Disk Usage Analyzer is baobab.

share|improve this answer

First, open Synaptic by running synaptic in the terminal. Type the name of the app in the quick filter box. For an example, I'll use LibreOffice Writer. Type the name of the app in the Synaptic filter: enter image description here

It appears as the first installed result (little green box), with the full package name libreoffice-writer in the first column.

Now, try running libreoffice-writer in the terminal. Sometimes the package will run, but in this case it doesn't work: enter image description here

Now, if you look back at Synaptic, you will see that the very first result is the libreoffice package. You could just run libreoffice in the terminal, in which case you get this window: enter image description here

Or, you could type man libreoffice in the terminal. If you look at the these two screenshots: enter image description here enter image description here

You can see that to directly launch LibreOffice Writer, you can use one of two commands: lowriter or libreoffice --writer. Both work equally well.

share|improve this answer
That's very interesting. Ubuntu 12.04 hasn't synaptic, but it has software-center (whose name I found using it itself). But I coudn't find the System Settings, which I discovered to be gnome-control-center thru the PS way. +1 anyway. – Sony Santos Apr 27 '12 at 18:59
Synaptic can be installed by running sudo apt-get install synaptic in terminal. It was removed at the 11.10 release. It is such a fantastic program, such a shame that they removed it from the official install. – Ryan McClure Apr 27 '12 at 19:19

What you can do is use xprop: it will let you click on a application and display information. To get the name, enter in a terminal:

xprop | grep WM_CLASS

if WM_CLASS doesn't work, then try with WM_COMMAND.

share|improve this answer

Some programs or applications simply run by a binary. By name of application one can find out where binary is located.

whereis name-of-application

ergo little example:

$ whereis gparted
gparted: /usr/sbin/gparted /usr/share/man/man8/gparted.8.gz

You simply can take over /usr/sbin/gparted - for to run this application gparted in entry of icon or application-name (like in cairo-dock). (in this case to run gparted root-password is necessary).

share|improve this answer

xprop allows finding the PID of a running window, while ps allows finding command corresponding to a PID. By combining the two together, we can find a command corresponding to a window , like so :

ps --no-headers -p $(xprop | awk -F '=' '/_NET_WM_PID/{print $2}') -o cmd 

xprop will turn your cursor into X , which you can use to click on a window, it will return the PID, and then ps will use that PID to print the command

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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