Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-12-2005, 05:01 AM   #1
Registered: Sep 2003
Posts: 52

Rep: Reputation: 15
How to start a program in terminal and let it 'detach'

In Windows, I can directly type the program name at the command prompt. The program starts up and I am able to continue to type other commands.

Using Linux terminal, I can't do that. The command prompt is not availabe until the program exits.

Is there a command to start a program and let it 'detach' from the terminal?
Old 04-12-2005, 05:06 AM   #2
Senior Member
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
Append the command with an ampersand (&) and it will run in the background. IE: If I wanted to launch Mozilla from a terminal, I'd type
mozilla &
to background it. Type
to bring it back into the foreground, and
man fg
for more information. To background a task already running (IE: You forgot the ampersand the first time), press <Ctrl>+Z to suspend it, then
to send it to the background. Also see
man jobs
as this will provide more information on job control.

Last edited by scuzzman; 04-12-2005 at 05:08 AM.
Old 04-12-2005, 05:08 AM   #3
Senior Member
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 63
Just add a '&' character at the end of your command. Eg:
your-prompt> /usr/local/bin/firefox &
Anything that can be done in DOS can be done in Linux shells.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to run a program on another terminal SharpyWarpy Linux - General 2 02-10-2005 02:09 PM
How do I tell what version a program is from a terminal? rkid Linux - Software 3 10-14-2003 02:07 AM
terminal program metallica1973 Linux - General 4 02-23-2003 11:04 PM
terminal program metallica1973 Linux - Networking 1 02-23-2003 10:09 PM
think -detach acid_kewpie General 3 04-04-2002 05:47 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:20 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration