Stop a running Emacs server and all its instances, asking for confirmation on unsaved files

emacs

  • The extensible, customizable, self-documenting, real-time display editor.
    See also `emacsclient`.
    More information: <https://www.gnu.org/software/emacs>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

emacsclient --eval '(save-buffers-kill-emacs)'

click the source code to copy install emacs on any operating system with command-not-found.com