Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 12-29-2002, 07:33 PM   #1
LQ Guru
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
sending process to background

i know if i run a command and attatch & to it, it will run it in the background and give me the prompt back, but lets say i dont start a program that way, and i want to later send it to the background, what is the command for that, i forgot
Old 12-29-2002, 07:44 PM   #2
Senior Member
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
Maybe you're looking for the command bg ?
Old 12-29-2002, 08:37 PM   #3
Registered: Dec 2002
Location: Omaha, NE
Distribution: Ubuntu Server and SuSE
Posts: 69

Rep: Reputation: 15
Job Control Stuff

You can start running the job interactively,
Ctrl-z will move it into the background, but there's a catch; it'll be stopped.
If its the only job you can type bg and it'll start running again in the background.
If it has a number other than [1] associated with it ( 2 for instance ), you can type bg %2
To move it into the foreground ( you guessed it ) fg -or- fg %2
To list all of the jobs ( you guessed it again ) jobs
Old 12-31-2002, 03:01 PM   #4
LQ Guru
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Original Poster
Rep: Reputation: 47
ok, bg didnt give me my prompt back. is there a way to send it to the background and keep it running?

here is what i'd like to happen:

<no prompt but gaim runs>

<some command here to put gaim in the background or to get the prompt back>

#<prompt back, but gaim is still running>

Last edited by Robert0380; 12-31-2002 at 03:03 PM.
Old 12-31-2002, 03:05 PM   #5
LQ Guru
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Original Poster
Rep: Reputation: 47
just to add, i dont REALLY need an answer to this badly, its just that sometimes i forget to put the & on the end and i was wondering if there were a way to get the prompt back without having to stop and restart the programming just to add the &

Old 12-31-2002, 03:33 PM   #6
LQ Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,155

Rep: Reputation: 56
did you see the post from pjcp64

that's your answer

bg does not give your prompt back, you must have a prompt to run bg

ctrl_z gives the prompt back and stops the job

bg makes it run in the background

same as filename &

Last edited by DavidPhillips; 12-31-2002 at 03:36 PM.


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending a job straight to background detly Linux - General 4 02-02-2005 02:51 AM
how to run any binary in background - background process tej Linux - Newbie 1 08-16-2004 12:27 AM
Background Process mojozoox Linux - General 1 08-26-2003 02:16 PM
Background process h8r Linux - Newbie 5 01-13-2003 04:21 PM
background process gurra Programming 9 09-30-2001 01:31 PM

All times are GMT -5. The time now is 07:33 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