Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Currently, I'm using nohup command & to send it in background. But the problem is: if I execute nohup command & I get outout as :

root@ubuntu:/home/test# nohup sleep 10 &
[2] 52439
root@ubuntu:/home/test# nohup: ignoring input and appending output to `nohup.out'
<I need to press ENTER key here to take back my shell control.>

What I need to do :

root@ubuntu:/home/test# nohup sleep 10 &
[2] 52439
root@ubuntu:/home/test# nohup: ignoring input and appending output to `nohup.out'

I don't want to press "ENTER KEY" after nohup sleep 10 &.

As, I'm working on automation part, I need that after one command is sent to background, I should be able to execute next command without pressing any key. Like:

root@ubuntu:/home/test# nohup start-server.py &
root@ubuntu:/home/test# nohup start-client.py &

[start-server.py needs to be running in background.] but the problem is, after start-server.py gets executed, it won't execute next command. I need to press "ENTER KEY" to go for next command.

Is there any solution? Any help would be greatly appreciated.

share|improve this question

migrated from stackoverflow.com May 31 '13 at 1:53

This question came from our site for professional and enthusiast programmers.

Why are you experimenting with commands as root? Use a non-privileged account. –  chepner May 30 '13 at 12:41
Write your nohup commands in one script say "script.sh" ... and execute it (sh script.sh) ... I hope it should work ... nd yes try a privileged account... –  Debaditya May 30 '13 at 12:42
You do not need to press ENTER, nohup is just failing to add a CR at the end off the output. Your shell is still parsing your input. –  mathk May 30 '13 at 13:24

3 Answers 3

up vote 4 down vote accepted
nohup sleep 10 2>/dev/null &

The nohup command prints a message to stderr, and 2>/dev/null sends stderr to /dev/null.

share|improve this answer
Thanks Uwe.. You saved the day..! Your answers was exactly what I was looking for. –  ShitalSavekar May 30 '13 at 12:54

No need for enter. Just type your next command and it will work (what you see is just some output after your shell prompt has been output). This is exactly the same as what happens when you type enter at the shell prompt: you get another prompt. :-)

share|improve this answer

You don't really need to press Enter. Although it looks like the standard error from nohup is on your command line, you can "type over" it, and only what you type is entered as the next command.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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