The emacs editor has many, many features, and there are many ways to use it. Its complete manual has more than 35 chapters. However, you can do a considerable amount of meaningful work with a relatively small subset of the commands. This section describes a simple editing session, explaining how to start and exit from emacs and how to move the cursor and delete text. Some issues are postponed or simplified in the interest of clarity. If you are using emacs in an X Window System environment, refer to “emacs and the X Window System” on page 520 as you read this section.
To edit a file named sample as a text-based editor (without a GUI), enter the following command:
$ emacs –q -nw sample