An ad-free and cookie-free website.
Learn the basics of one of many text editors at the Linux command line.
Videos can also be accessed from the Linux Essentials Playlist on YouTube.
Linux emacs Command Summary with Examples (3:33)
Our fifty-sixth word, or command to memorize is
emacs from our category
emacs allows you to edit text files.
||Print help screen|
||Internal help manual|
||Internal command to quit emacs|
Recall from video 20 on
first text editor, it offered a simple tool for quick edits, but for added
functionality, most people use a program like
vim, which we'll be introducing in our
next video (tutorial).
Before we start, it helps to think of commands as mini programs and
most follow this structure:
command -option(s) argument(s).
emacs command has
over 50 options and the argument is a text file to
edit, and because
emacs is a
full-blown text-editing program, its list of internal commands is vast.
Like most commands, help is available with double-dash. Once inside
emacs view internal help with
r. And importantly, to quit, type
So why is
emacs an important command?
Well, programmers spend lots of time in editors, memorizing commands,
and you'll need to find your go-to editor.
And now you know how to do that.
Okay, the best way to embed this in your memory is by typing in your own terminal window.
Find this on your Mac using a program called Terminal. On Linux use Terminal or Konsole, and currently Microsoft is adding this functionality to Windows.
Here we go. Let's start with the
emacs --help option, and redirect that
> to a file called
emacs and that filename
Here it is, use
PgDn to scroll.
Here I only have time for a quick flyby. But there are options here, as you can see, for initializing the program (above).
Taking actions (above) and changing displays.
Okay, then, to quit, type that combination
And then one last thing, why don't we head back in
without an argument.
And this will show you an opening screen with a list of helpful resources, like manuals and a tutorial. Okay, very good.
Okay now you know how to use
And you know the syntax for commands, options and arguments.
One last tip about the vast
command. So I should mention, most people use a text editor within their
GUI, instead of the terminal. Just a quick comment there.
Okay, thanks for visiting today. I hope this was a helpful
introduction to the
For an overview of the 100 videos, the 8 quizzes, a cheat sheet, the categories and a Q&A section, visit:
If this quick summary was helpful, please consider subscribing to our growing YouTube Channel, following @factorpad on Twitter and the no-spam email list for content update notices.
morecommand, hit Back.
A newly-updated free resource. Connect and refer a friend today.