Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 run the node server by typing

node server.js

from a putty terminal to get it running. Now i want to stop the server how should i do it? I tried pressing the pause break button on the keyboard. But it is not stopping it.

share|improve this question
up vote 3 down vote accepted

Try using ctrl+c, usually does the trick.

share|improve this answer
programmatically, you can use app.close() if var app = require('http').createServer(). – Lance Pollard Apr 12 '12 at 21:19

If you are going to use the 'top' command to kill a process, you should try sending the '2' signal first, not '9'. Sending '9' is kind of like pulling the plug on your computer instead of issuing a shutdown command. It can sometimes have some undesirable consequences. Sending '2' has the same effect as ctrl+c.

For reference, here are the different signals you can send to stop a process and what they mean: (from kill man page)

 1       HUP (hang up)
 2       INT (interrupt)
 3       QUIT (quit)
 6       ABRT (abort)
 9       KILL (non-catchable, non-ignorable kill)
 14      ALRM (alarm clock)
 15      TERM (software termination signal)
share|improve this answer

Enter 'top' at command line and find the process ID of the process you want to kill. Press 'K', it will prompt you to enter the process id that you want to kill, enter it, and press enter. It will then ask what signal you want to transmit to the process, enter '9' and press enter. The process will be killed.

share|improve this answer

Try from another terminal

killall -KILL node

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.