Find the answer to your Linux question:
Results 1 to 6 of 6
Hello, I had a look at the job basics in linux (linuxreviews.org/beginner/jobs/) but I don't know how to send a job to the background when the command is already run ...
  1. #1
    Just Joined!
    Join Date
    Jan 2006
    Posts
    12

    Question How to send an application to the background with a key combinatiion

    Hello,

    I had a look at the job basics in linux (linuxreviews.org/beginner/jobs/) but I don't know how to send a job to the background when the command is already run and I don't have the prompt because the application is running. To run a new command, I would have to stop the application first... I'm searching for a key combination that doesn't stop my application, but sends it to the background and gives me the prompt to run other commands.
    Thanks!

  2. #2
    Linux Enthusiast
    Join Date
    Apr 2004
    Location
    UK
    Posts
    658
    Hi there,

    The combination you are looking for is control+Z. That will suspend the job. If you want it back use 'fg' and if you want it to keep running in the background use 'bg'.

    Check the man pages for these commands to see how to switch between two tasks and let us know how you get on.
    To be good, you must first be bad. "Newbie" is a rank, not a slight.

  3. #3
    Just Joined!
    Join Date
    Jan 2006
    Posts
    12
    Hi,

    Thanks, actually, I don't want to stop the application (it's a process that streams video). How can I send it to the background without stopping it?
    Thanks,

  4. #4
    Linux Enthusiast
    Join Date
    Apr 2004
    Location
    UK
    Posts
    658
    Hi there,

    You have two choices: the one above is to stop it temporarily and use the 'bg' command to continue it in the background. The other is to start the program with an '&' at the end of the command line to start it in the background.

    I don't know of any way to take if from running in the foreground to running in the background in a single step.

    Let us know how you get on
    To be good, you must first be bad. "Newbie" is a rank, not a slight.

  5. #5
    Just Joined!
    Join Date
    Jan 2006
    Posts
    12
    Thanks, nevermind. None of these solutions will work, because I can't afford to stop the program from streaming, not even for a few seconds. Also, if I append & at the end of the command, the program returns an error message and won't start streaming. That's not a big deal anyway
    Thanks again.

  6. #6
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,096
    You need to have a space between the command and &

    Another way is to start your command in a screen session.
    You must always face the curtain with a bow.

Posting Permissions

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