10. Emacs Manipulate Files

In a lot (if not all) of Emacs documentation, you will see the syntax C-[letter]. This just means hit the Ctrl-letter, but for shorthand purposes, we'll call Ctrl with C. If you see syntax such as M-[letter], that means use the Meta key, most commonly the Alt key.

Saving files

C-x C-s - Save a file
C-x C-w - Save file as
C-x s - Save all

The save file options will prompt you if you want to save each file.

Opening a file

C-x C-f

This will prompt you to type a filename to open. If you do not have a file that already exists, it will create a new file. You can load up a directory as well.

Sign in to save your learning progress

Sign in

Exercises

While there are no specific labs for this topic, we recommend exploring the comprehensive Linux Learning Path to practice related Linux skills and concepts.

Quiz

What command is used to open a file?