Results 1 to 8 of 8

Thread: How t ofind command line name of a program?

  1. #1
    Join Date
    Aug 2008
    Location
    Illinois
    Beans
    36
    Distro
    Ubuntu 8.04 Hardy Heron

    How t ofind command line name of a program?

    Whenever you open the terminal and enter in a program, like for Firefox, you type "firefox". I've installed several applications via source code, but I don't know what their names are. Just for an example, one of them is an alien-converted(rpm to deb) resolution changing program named sax2, but that isn't the terminal name.
    "to compile a compiler, you need a compiler" ~The Linux From Scratch online guide

  2. #2
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: How t ofind command line name of a program?

    If the program name you are looking for is for a GUI app, one trick you can do is run the GUI app from the menus, and then in a terminal do:
    Code:
    xprop | grep WM_CLASS
    Then click on the GUI app Window, and most of the time the "WM_CLASS" field of xprop will tell you the GUI app name that can be run in the terminal. Is that maybe what you are looking for?

  3. #3
    Join Date
    Dec 2006
    Beans
    1,133
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How t ofind command line name of a program?

    In this particular case since you installed from a deb, you can use synaptic, search for the package, then click on the tab that says "installed files" Look for one that is in one of the bin directories. From the command line you can do the same thing with something like
    dpkg -L packagename|grep bin

    Another way, if you know at least part of the command name, is to use the "locate" command. For example, say you know that there is a command for tweaking linux filesystems that has the word "tune" in it, but can't remember the exact name.

    locate bin/tune
    on my system returns:
    /sbin/tune2fs
    /usr/sbin/tunelp

    One more thing I frequently use is the "man -k", used like "man -k keyword" This will search all man pages for "keyword" and return a list of commands and short descriptions.
    Last edited by lswb; January 15th, 2009 at 04:32 AM.
    There are no dumb questions, just dumb answers.

  4. #4
    Join Date
    Jul 2006
    Beans
    51

    Re: How t ofind command line name of a program?

    And remember - Linux is case sensitive. firefox is not the same as Firefox.

  5. #5
    Join Date
    Oct 2006
    Location
    Philippines
    Beans
    225
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: How t ofind command line name of a program?

    Wow, thank you all. I am gonna put this in my list of how tos. Thanks

  6. #6
    Join Date
    Oct 2008
    Location
    Brisbane, Australia
    Beans
    139
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How t ofind command line name of a program?

    Its also helpful to remember that applications are named whatever is in the bin and sbin folders.

    To find a program to do something specific I highly recommend Google.
    Ubuntu Forums Beginners Team
    Compiz Problems? Click here
    You can do anything you set your mind to when you have vision, determination, and and endless supply of expendable labor.

  7. #7
    Join Date
    Jan 2008
    Location
    Manchester UK
    Beans
    13,573
    Distro
    Ubuntu

    Re: How t ofind command line name of a program?

    A trick I use to launch gui apps remotely on my server is to click

    system > preferences > main menu

    Navigate through that until you find the app you want, click on properties and it will show you the launch command.

  8. #8
    Join Date
    Jan 2007
    Location
    $here ? $here : $there
    Beans
    3,717
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: How t ofind command line name of a program?

    Another option is:

    Code:
    dpkg -L name_of_package | grep bin/
    Conversely to figure out package a binary (or any file) came from:

    Code:
    dpkg -S /path/to/file
    Don't try to make something "fast" until you are able to quantify "slow".

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •