Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using ubuntu 8.04.4 and would like to start daemons like this:


Then i want to kill these screens with -X like so

screen -S SESSIONAME -X kill

But, this does not work. Only if i attach and detach that session it gets kill'ed with above command. What am i doing wrong? I would like to not have to attach/deattach the session to kill it since i want to use fabric scripts that start/stop daemons remotly.

- Thank you

share|improve this question

For daemons you really shouldn't be running them in screen.

In debian derived systems (such as Ubuntu) start-stop-daemon is the thing to use, RedHat and derivertives have a similar tool.

Read the man page, look at some init scripts for examples. on Ubuntu you may need to do a little delving as Upstart has mostly replaced standard init sctipts.

share|improve this answer
Yes you are right. These daemons are just for my development and the thing i want to use screen for is that i want to be able to start/stop them from my local system. thank you – Anonymous May 1 '10 at 20:00

Try this:

screen -S SESSIONAME -X quit
share|improve this answer
Great, -X quit did the trick. -- Thank you guys – Anonymous May 1 '10 at 19:58
It works for me, thanks! – Oleg Jun 5 '12 at 11:54

Your Answer


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