Starting Emacs
To start Emacs, simply type emacs followed by the name of the file you want to edit. If you use a filename that doesn’t exist, Emacs creates a new file. You’ll most likely see something like this: [6]
%
emacs
myfile
Type emacs with a filename at the UNIX prompt to start an Emacs session.
Of course, if the file you request already exists, Emacs reads the file and displays it on the screen:
%
emacs
dickens
You can omit the filename, if you want. If you just type emacs,
you’ll see a short message describing the version of Emacs that you’re
running, how to start the help system, and a few other trivia. This
message disappears as soon as you type the first character. Emacs
then puts you in an empty buffer called *scratch*
, which is an
ideal place for you to experiment.
[6] The command name may vary somewhat from site to site. GNU Emacs is sometimes called gnumacs or gmacs, particularly at sites with many editors installed. It may also be necessary for you to modify your UNIX search path. If typing emacs, gnumacs, or gmacs gives you a “Command not found” error message, ask your system administrator for help.
Get Learning GNU Emacs, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.