How To Exit Emacs

Utilities Software

Exiting Emacs can be a simple yet essential part of using this powerful text editor. As a seasoned Emacs user, I’ve come across various methods to gracefully exit Emacs, and I’m thrilled to share my knowledge with you.

Using the Keyboard Shortcut

One of the quickest ways to exit Emacs is by using the keyboard shortcut Ctrl + x Ctrl + c. This keystroke sends a command to Emacs to exit, prompting a message in the minibuffer to confirm the action. Simply typing ‘yes’ or ‘y’ and pressing Enter will smoothly shut down Emacs.

Using the Command Prompt

Another method I often use is accessing the command prompt within Emacs by pressing Meta + x to open the M-x prompt, typing exit, and then pressing Enter. This also triggers the exit confirmation message in the minibuffer.

Alternate Methods

If you prefer an alternative approach, you can also enter the command M-x save-buffers-kill-emacs in the M-x prompt to save any unsaved buffers before exiting Emacs. This ensures that your work is safely preserved before Emacs closes.

For those who enjoy customizing their workflows, it’s possible to create personalized exit commands or keybindings to suit specific preferences. This level of flexibility is one of the many reasons why I adore using Emacs for my text editing needs.


Exiting Emacs is a fundamental action that every user should be familiar with. Whether you opt for the standard keyboard shortcut, utilize the command prompt, or explore customized methods, gracefully exiting Emacs is part of the overall experience of using this powerful text editor. As you continue to dive into the world of Emacs, I encourage you to experiment with various exit techniques to find the method that best complements your workflow.