How to stop emacs server

emacs

I started a Emacs in my terminal, and then started running Emacs server inside it by M-x server-start. Now I would like to cancel running the Emacs server without exiting the Emacs process. There seems to be no command for that. How can i do that? Thanks.

Best Answer

The command to do that from inside emacs is

M-x server-mode

The first time you run it, it'll restart the server it's running. The second time, it'll stop the server.

To make sure that you're stopping the server, pass a non-positive prefix argument: M-0 M-x server-mode RET

Related Question