2

I usually start a long-haul job with screen, and once the job starts, I just Ctrl+a, then d to detach.

How to achieve the same thing using command line?

I tried

screen -dm bash -c 'mySlowJob.sh > /dev/null'

but the screen doesn't detach until the job is done.

closed as unclear what you're asking by Gilles, Archemar, GAD3R, Stephen Kitt, Anthon Jan 3 '17 at 8:11

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Hmmm... This does what it's supposed to do on my end. Do you have anything that may interfere in your ~/.screenrc file or in the Bash startup scripts? – Kusalananda Jan 2 '17 at 8:39
  • You can use 'nohup'. – rajaganesh87 Jan 2 '17 at 9:14
  • @rajaganesh87: nohup, by itself, is not close to being a solution or even a helpful suggestion. How do you suggest that the OP use nohup to get his command to work? – G-Man Jan 3 '17 at 2:30

Browse other questions tagged or ask your own question.