How to find a programs name?

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Class--

How to find a programs name?

Post by Class-- »

Hi Folks,
So I'm a noob at linux and I'm finding the small things difficult at the moment. Simple things like working out how to find the name of a program to use a command on it in the cli.
I found a "way" but it seems like the long way round as it means the program has to be running for me to see its name ie using the command

Code: Select all

 top 
So what is the easiest method? My windows background would be to look at the properties of the shortcut and see the file name there but in gnome3 the only thing that happens on a shortcut is the option to open in new window or add shortcut to the side bar thingy.

Thanks for any input

Class--
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
MALsPa
Level 8
Level 8
Posts: 2040
Joined: Mon Nov 19, 2007 10:17 pm
Location: albuquerque

Re: How to find a programs name?

Post by MALsPa »

Yeah, in KDE or Xfce, I'd just right-click on the app's icon on the panel to find the command that runs the application.

In GNOME 3, you can open Nautilus and go to /usr/share/applications, find the app, right-click > Properties. There you'll find the actual command that runs the application.
User avatar
kyphi
Level 9
Level 9
Posts: 2735
Joined: Sat Jul 09, 2011 1:14 am
Location: The Hunter Valley, Australia

Re: How to find a programs name?

Post by kyphi »

I suppose that what you really meant to ask was "how to find the path statement to a program".

If you install "alacarte" (sudo apt-get install alacarte) it will present in your main menu as "Main Menu". All your applications will be listed there and will reveal their path.
Linux Mint 21.3 Cinnamon
Class--

Re: How to find a programs name?

Post by Class-- »

MALsPa wrote:Yeah, in KDE or Xfce, I'd just right-click on the app's icon on the panel to find the command that runs the application.

In GNOME 3, you can open Nautilus and go to /usr/share/applications, find the app, right-click > Properties. There you'll find the actual command that runs the application.
Ahh ha now thats exactly what I wanted. So its the "command" I was after and not the "name" of the program.
See I just find that little bit of info quite hard to find especially since everything in Linux seems to be command line based or am I looking at this from the wrong direction?
Anyway thats another lil hurdle jumped in the 100m hurdle race that is my linux learning curve :D
kyphi wrote:I suppose that what you really meant to ask was "how to find the path statement to a program".

If you install "alacarte" (sudo apt-get install alacarte) it will present in your main menu as "Main Menu". All your applications will be listed there and will reveal their path.
Cheers kyphi, I've installed it and I guess thats just another way of doing what MALsPa said.

Thanks for the info folks.

Class--
Arcturus691

Re: How to find a programs name?

Post by Arcturus691 »

I find that the easiest way is to open a terminal and type the following:
which [program name]

for example:

which chromium-browser

this gives the result:
/usr/bin/chromium-browser

I know the command line in other operating systems is shunned but it is worth knowing some of the basics in the terminal command line.
Class--

Re: How to find a programs name?

Post by Class-- »

See now that's what I'm talking about. Where do u find out (simply) that chronium is called chromium-browser when using the command line. That's what my initial post is about. Let's just say I wanted to use the "which" command on firefox. That's easy I just follow what your saying and type

Code: Select all

which firefox
Great that worked as long as I remember it always starts with a lowercase letter. Now what if I want to do a "which" command for my BitDefender antivirus program. Following my success with firefox I automatically type in

Code: Select all

which bitDefender
and bam I'm hit with linux askin me confused I'm on about :( so this means I can't do anything "the easy way" as I'm stuck at the first obstacle and it seems a fairly simple one. Its just I have to do what MALsPA said which seems far from the whole "easy" way. Or I could run the program from the shortcut and then run "top" in the terminal and then and only then know what to type ie.

Code: Select all

which bdGUI
so the question is this... Am I the idiot here not seeing something simple? Or is this a gnome 3 thing? OR is this a linux thing?

Cheers for reading folks

Class--
Habitual

Re: How to find a programs name?

Post by Habitual »

which <program>
whereis <program>
locate <program>
ps -e | grep "*part of program name*"

Launcher properties are the easiest method.
Class--

Re: How to find a programs name?

Post by Class-- »

Habitual wrote:which <program>
whereis <program>
locate <program>
ps -e | grep "*part of program name*"

Launcher properties are the easiest method.
Hi Habitual,
Sorry but what do you mean by this? I dont quite understand what your trying to tell this n00b :)
But my main point is how can anyone do any of what you have said if they cant find out what to insert in the <program> part because its not easy to find that info out?

Thanks for replys

Class--
Arcturus691

Re: How to find a programs name?

Post by Arcturus691 »

Class-- wrote:See now that's what I'm talking about. Where do u find out (simply) that chronium is called chromium-browser when using the command line. That's what my initial post is about. Let's just say I wanted to use the "which" command on firefox. That's easy I just follow what your saying and type

Code: Select all

which firefox
Great that worked as long as I remember it always starts with a lowercase letter. Now what if I want to do a "which" command for my BitDefender antivirus program. Following my success with firefox I automatically type in

Code: Select all

which bitDefender
and bam I'm hit with linux askin me confused I'm on about :( so this means I can't do anything "the easy way" as I'm stuck at the first obstacle and it seems a fairly simple one. Its just I have to do what MALsPA said which seems far from the whole "easy" way. Or I could run the program from the shortcut and then run "top" in the terminal and then and only then know what to type ie.

Code: Select all

which bdGUI
so the question is this... Am I the idiot here not seeing something simple? Or is this a gnome 3 thing? OR is this a linux thing?

Cheers for reading folks

Class--
Ok this is where the find command comes into play:

for example: find /usr/bin -iname GEDIT

the above command tells find to search from the "/" root directory, ignore case (-i) name followed by what you are searching for. This gives you the results for gedit. Also you can use wild cards if you only know part of the name:
find /usr/bin -iname chrom*
So that addresses the question about knowing the case.

You may want to learn more about how the linux directory structure is setup, I have taken classes on linux, which made it much easier to navigate linux via command line. I remember correctly most user installed programs are stored in /opt or /usr. With that said IMHO I would like to see more gui tools for those that do want to dig deeper and use the command line.

update: found a tutorial on the terminal (command line): http://community.linuxmint.com/tutorial/view/100
Locked

Return to “Beginner Questions”