In the past, I've used nohup to run big background jobs, but I've noticed that a lot of people use screen in this context. Does screen provide some kind of functional advantage that I am unaware of, or is it just a matter of preference?

migrated from stackoverflow.com Nov 15 '11 at 21:17

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


Both have there own + and - :


  1. nohup is good to use for running procs in background when proc don't need any user input like HTTPD server or any other server proc like that.
  2. nohup does create log in dir of proc execution. log file name default is nohup.out
  3. It avoids proc getting killed due to mistaken ctrl+C , ctrl+D . Just a safe guard.
  4. It's normally installed by default with basic setup. No need to install separately like screen.
  5. It's functionality is very specific to running a job in background and dumping output. Low memory intensive.


  1. Got to install separately. You can go to a data center or login to
    any box and expect screen is present.
  2. Good to manage multiple terminals on separate subjects and give them name.
  3. Its more of terminal manager and not a command to run a proc for infinite time like nohup.
  4. It's more suitable if proc need user input. Like install
    scripts, yes/no prompts.
  5. With tones of features, comes it's memory. But agreed, some are really great features.

@rahmu, I will never guess pid if want to kill it. Be sure before killing someone/something ;) .

Best way in both cases for screen and nohup is: ps -eaf | grep "nohup" | grep "your proc name/keyword" .

Use screen and check what is running on it.

To conclude, both are two different things made with different agendas so comparison is difficult.



screen has a ton of features. It doesn't just "daemonize" a process, it's more of a window manager for terminals.

It can be used if the process needs input at some point, you can go and check the process's output, reconnect to its terminal, ...

So no, it's not just a matter of preference, they are not the same thing at all.

  • 4
    You can check the output with nohup [...] > fileName.log 2>&1 as well. Plus that means that the output is not lost. – Sardathrion Nov 16 '11 at 8:12
  • 1
    I like that description of screen: "a window manager for terminals"! – rickumali Nov 16 '11 at 12:04

screen lets you:

  1. come back to the actual running screen, send signals, see how fast it goes, see whether there are error messages etc..
  2. name processes with a meaningful title. if you want to kill one process you don't have to do a guess work about its process id.
  1. process progress can be checked also by nohup by database fields debug.
  2. ps ax | grep nohup will show you the id of the process and you can kill it.
  3. nohup is faster. The simple reason is that it depends on the internet connection between your PC and the server. Whenever the internet goes slow, the process goes slow as well.
  • 2
    I don't understand point 3. Can you elaborate? – mattdm Jun 8 '16 at 14:22
  • 1
    point 2 is incorrect. – jiggunjer Aug 25 '16 at 12:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy