Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question

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

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

3 Answers 3

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.

share|improve this answer
    
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
    
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.
share|improve this answer

My friend,

  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.
share|improve this answer

Your Answer

 
discard

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