简体   繁体   English

在Linux中退出正在进行的Node.js服务器

[英]Exiting an ongoing Node.js server in linux

When I run my node server node server.js through SSH, the server starts and operates properly, however, I am left at the command prompt on a blank line, and no matter what I try to do, I can't "escape" out of that back to root /]# . 当我通过SSH运行节点服务器node server.js ,服务器会启动并正常运行,但是,我在命令提示符处留在空白行,无论我做什么,都无法“转义”从那回root /]# Is it necessary for me to terminate the session completely and rerun a new SSH session to be able to operate on the prompt again? 我是否需要完全终止会话并重新运行新的SSH会话才能再次在提示符下运行?

I'm sure this is a completely basic problem with a completely basic solution, I just can't for the life of me seem to "escape" out of this back to the command line. 我确信这是一个完全基本的解决方案,它是一个完全基本的问题,我只是一辈子似乎无法“逃脱”回到命令行。 It would seem unlikely that it would be necessary to completely exit out of PuTTy and start a new session just to terminate it.. 似乎没有必要完全退出PuTTy并开始新的会话以终止它。

要发布答案,您是否尝试按Ctrl + C或Gabi提到的Ctrl + D ,通常会退出我通过CLI启动的大多数服务器。

您可以使用GNU Screen在此处快速参考)在现有的PuTTy会话中同时使用多个终端接口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM