When I type firefox in terminal, it starts Firefox but the terminal "hangs".

What is happening behind the scenes?

Can I open Firefox from terminal and keep on using the same terminal tab for other things without closing Firefox?

  • 2
    You would have found the solution yourself if you had done a bit of searching. Just put & after the command and it will run on background. – Risto Salminen Dec 3 '13 at 10:53
  • What is happening if I don't put &. How would you start firefox from the terminal if you had to and why? – AWE Dec 3 '13 at 13:32
  • 2
    Well, then the terminal will just hang as you noticed. – Risto Salminen Dec 3 '13 at 14:02
  • upvote for honest, no nonsense answer – AWE Dec 3 '13 at 14:36

The terminal locks when you are running an application from it as long as the application is running. With the ampersand (&) you can start the application in the background and still use the terminal. Type:

user@host:~# firefox &

To start firefox in the background. Output of the application will still be in the terminal.

Or, if firefox is already running you can do this:

  1. Ctrl+z to put firefox into the backgroound.
  2. Type:


    You should see your jobs like :

    [1]+  Stopped  firefox.
  3. Type:

    bg %1 

    (or number of your job)

  • Are you running firefox as root? – MattBianco Dec 16 '15 at 9:24
  • @MattBianco No, why? – chaos Dec 16 '15 at 9:25
  • Traditionally, prompts ending with # indicate elevated privileges. (I didn't think you did, btw) – MattBianco Dec 16 '15 at 9:26

Use nohup firefox & to run firefox from terminal and you can use terminal for other process, if you close terminal, firefox will not quit.

If you get error like Another instance is running then use nohup firefox -P --no-remote & and create a new user profile and browse.


You can use the & symbol after your command to run it in background.


Use this command to run firefox in background as well you can exit the terminal but still the firefox will run.

hussain-->~#nohup firefox &

When you simply open the firefox then it will not return the prompt after closing the firefox only it will return the prompt.

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