FedoraForum.org - Fedora Support Forums and Community
Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2010

    Question How can i run installed program from terminal

    How can i run installed program say "Firefox" from terminal?
    LAPTOP HCL ME B3863 @Intel(R) Core(TM)2 Duo CPU T6600 @ 2.20 GHz, 4GB RAM, 320 HDD,GeForce 8200M G (GPU 0),GRAPHICS BY NVIDIA
    Fedora Release 14 ,Kernel Linux,GNOME 2.32.0 NVIDIA DRIVER VERSION: 260.19.12

  2. #2
    Join Date
    Aug 2009
    Waldorf, Maryland

    Re: How can i run installed program from terminal

    Usually, by just typing in "firefox" on the command line.

    There are things to know - is the command line presented as a window?
    The firefox application assumes that the X window system is running. This is not
    necessarily the case if you are using a console terminal for command entry.

    If you are using a terminal window, then just typing "firefox" at the command line
    will work - it will open additional windows for interacting with the firefox application.

    Are you, by any chance, trying to learn how Linux works?

  3. #3
    Join Date
    Apr 2010

    Re: How can i run installed program from terminal

    yes i am learning
    can you say me in which directory of linux binary executable of installed program stayes?
    LAPTOP HCL ME B3863 @Intel(R) Core(TM)2 Duo CPU T6600 @ 2.20 GHz, 4GB RAM, 320 HDD,GeForce 8200M G (GPU 0),GRAPHICS BY NVIDIA
    Fedora Release 14 ,Kernel Linux,GNOME 2.32.0 NVIDIA DRIVER VERSION: 260.19.12

  4. #4
    Join Date
    Feb 2010

    Re: How can i run installed program from terminal

    if you
    echo $PATH
    you'll get a list of paths(or directories, as you call them). If you want a specific executable's path, type
    which command
    at the prompt, and it will tell you.

  5. #5
    Join Date
    Aug 2009
    Waldorf, Maryland

    Re: How can i run installed program from terminal

    The linux system is modelled after UNIX, though there are a lot of internal differences,
    and some external differences.

    All files reside within a directory tree - the tree contains data, executables and references to devices. This directory tree is based on a "root" directory which is
    where all directory paths start. This "root" directory has no name - it is represented
    by a "/" at the beginning of a path. Under the root directory are additional directories
    /          - the root of the directory tree
    /bin       - where basic executables are put
    /boot      - where the system usually resides (this is different that unix)
    /dev       - where device references are put
    /etc       - basic system configuration files (logins, network configurations...)
    /home      - usually where user login "home" directories are put
    /lib          - contains general system libraries, or directories with more libraries..
    /lib64      - systems using 64 bit processors keep 64 bit versions of libraries
    /lost+found - used for filesystem recovery, and not generally useful for anything else
    /media      - where linux tends to mount removable devices (CD, memory sticks, cameras...)
    /mnt     - usually used for temporary mounts, testing things, also where disk/memory sticks may be mounted
    /opt      - one of the places applications may reside
    /proc     - a special directory tree containing internal system references (processes, active devices, dynamic kernel parameters...)
    /root      - the home directory for the system administrator (a login named "root")
    /sbin      - executables that are usually reserved for use during boot. Normally, these
                binaries do not use libraries so that they may be used in a "reduced
                functionality" mode to allow the administrator to recover/fix sever problems.
    /selinux  - used in Linux for an enhance security operation
    /sys      - another special directory used for internal use
    /tmp       - a general read/write area that is not guaranteed to hold data across boots
    /usr       - a directory used to hold libraries, executables, and configuration files for
              applications available after the system is operational.
    /var      - a workspace directory used for log files, audit trails, and some applications
    Each of these directories may have additional directories contained within.

    The complete directory tree can be quite extensive. The directory tree is usually
    divided up into "filesystems" where a filesystem contains closely related files.

    A filesystem is "mounted", which means that a link is made between an existing
    directory (such as /boot), and a filesystem which is outside the existing directory
    tree. I choose /boot for this example because it contains all files that are necessary
    to boot the linux kernel. The system is not ready for use at this time, but can be
    made usable afterwards. The files within this filesystem are for the kernel, and the
    initial boot of Linux. There are configuration files there and the kernel itself.

    The "root" of the filesystem contains files like
    (This is from my system - yours may have different files, but they should
    have similar names)

    The reason /boot is frequently a filesystem is that it allows for a relatively
    small disk (or partition of a disk) to be used to initialize a system. It also
    separates the most critical files from accidents.

    The basic steps the system takes to become operational (and this is NOT
    an exhaustive sequence, and the details can get complex) is not generally
    that complicated -
    1. the BIOS loads a program that understands filesystems - this problem
    in Fedora is called "grub". This program understands several Linux file
    systems, but not all. For this reason, booting linux requires a filesystem
    that is known to the grub program.

    2. Grub copies the linux kernel into memory (passing some basic kernel
    options) and load a basic filesystem with it (the "initrd-" file associated
    with the kernel). The linux kernel then creates a memory resident
    filesystem, and unpacks/restores the data in the "initrd-..." file. This
    filesystem is strictly temporary, as it allows for small applications in
    the filesystem to examine the hardware, and initialize drivers. It also
    mounts what is identified as the "root" filesystem for operational use.

    3. Now that the root filesystem is mounted, the temporary memory
    resident filesystem can be removed and the memory is reused for
    general system memory. The boot process continues by running
    the first general process - init. At this point, the system is roughly
    equivalent to having turned on a printer. It is running (sort of), but is
    not yet ready to do anything.

    4. There are two processes actually active - 0 (the idle task) and 1 (init).
    If the init process ever terminates, the idle task can/will halt the system.
    This was the original way to shutdown a UNIX system - just kill the init
    process. The reason this halts processing is that the init process has
    several things to do -
    a. start any additional processes necessary
    b. "clean up" and release any resources taken by processes that

    One of the things the init process does is to execute scripts that mount
    additional filesystems - traditionally, /home has been a separate filesystem
    to reduce possible interactions between users, and the files of the system.
    Some other tasks are - loading special device drivers, starting system
    daemons (such as sshd, network utility daemons) and loading security
    One of the last things it does will be to start an X login utility, or start
    terminal initialization utilities for console login.

    When you login at a console terminal, the login utility takes your given
    login name, and matches your provided password against files in
    /etc (specifically, /etc/passwd, /etc/shadow). These files also define
    the base for your login - what command shell you will use, where your
    home directory is, and what capabilities you will be given. Once this
    information is set, the login program will execute your shell (I will assume
    this will be bash).

    When the shell starts, it will read configuration/initialization parameters
    from several places - system provided ones from /etc/profile, personal
    provided ones (home directory file .bash_profile) then, and only then
    will a prompt be presented.

    The shell will interpret command line entry by taking the command line
    entry and splitting it up into "words". The first word begins with the
    first nonblank, and continuing until the first following blank/tab. This
    word is used as the application name.

    There are several characters that can be used to control how this word
    is interpreted. If the first character starts with a "/" then it is taken as
    the absolute path to the application. The application name follows the
    last "/" character in the word. If there is no "/" then the word is looked
    up in a list of locations to find the application. If the shell can't find one
    then an error message (such as "bash: xyzzy: command not found" is
    printed, and you are prompted for another command.

    This list of locations can be defined by the system (the /etc/profile), or
    by the users .bash_profile. The shell maintains this list in an "environment"
    parameter/variable. The shell maintains two lists of such parameters, one
    list is used by the current process, another list (the exported list) is passed
    to applications. Don't forget, the shell itself is just an application. This
    variable is named "PATH", and by default it will include the basic locations
    of where applications are: /bin, /usr/bin, /usr/local/bin... there can be
    a lot of entries.

    You will be able to find out a lot more at

    But I hope this just gets you started.

  6. #6
    Join Date
    Aug 2017
    Brownsville, Texas

    Re: How can i run installed program from terminal

    When trying to run firefox from the command line I get this error message :
    [root@localhost bin]# google-chrome-stable
    No protocol specified

    (google-chrome-stable:4085): Gtk-WARNING **: cannot open display: :0
    [root@localhost bin]# ^C
    [root@localhost bin]#

    Anyone know how to launch firefox or any other application from the terminal. I don't want to use it in the terminal, I just want it to launch as a GUI application.

  7. #7
    Join Date
    Oct 2010

    Re: How can i run installed program from terminal

    In somewhat simplified terms what has happened is that the display system is running on behalf of the user that logged in. When you change user (even to root) you are no longer allowed access to the user's display.

    You should try to avoid using GUI programs (other than simple editors) as the root user. These programs include a lot of libraries that may not be very secure.

    You should never run a browser as root. The most likely vector for a virus is the browser, and giving it a direct path to all your system files is asking for trouble.

  8. #8
    Join Date
    Jun 2005
    Montreal, Que, Canada

    Re: How can i run installed program from terminal

    Adding to what Ocratato posted.

    Are you using Wayland or X (gnome or gnome-xorg)?

    if with gnome alone you are using Wayland. Wayland will not allow you to run firefox from the command line. gnome-xorg will allow that action. Log in as gnome.org (refer to the "gear" on the logon page after you select your logon id).

    If in pure terminal mode (example ctl+alt+f4) you have no terminal going. You could execute startx to open a second graphical session and subsequently run firefox.

    Second!, as root, you should not be using a browser. That action opens the door to receiving a virus, and then if unlucky, your system may pull in a virus compromising your system.

    If your system is compromised, you may be sending out compromised (virus infected) emails, even if later after leaving the root account, you are running as a regular user.
    Leslie in Montreal

    Interesting web sites list

  9. #9
    Join Date
    Jun 2013

    Re: How can i run installed program from terminal

    Quote Originally Posted by southmost
    Anyone know how to launch firefox or any other application from the terminal. I don't want to use it in the terminal, I just want it to launch as a GUI application.</b>
    Log in as your regular user, not root.
    $ firefox
    $ firefox &
    which will send it to the background so in case you Ctrl-C or close the terminal window it will not kill Firefox.
    Mind the gap.

Similar Threads

  1. Using Alt+F2 to execute program from terminal
    By kjartani in forum Using Fedora
    Replies: 9
    Last Post: 21st October 2009, 01:19 PM
  2. Replies: 3
    Last Post: 29th June 2007, 10:23 AM
  3. open using default program in terminal
    By mlissner in forum Using Fedora
    Replies: 3
    Last Post: 12th November 2006, 12:47 PM
  4. Logging in to terminal run program
    By Chipper in forum Using Fedora
    Replies: 4
    Last Post: 12th July 2006, 06:45 PM

Tags for this Thread

Posting Permissions

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