An ad-free and cookie-free website.
Learn to edit text files at the Linux command line.
Videos can also be accessed from the Linux Essentials Playlist on YouTube.
Linux nano Command Summary with Examples (3:54)
Our twentieth word, or command to memorize is
nano from the category
nano allows you to edit text files.
||Print help screen|
||Open in read-only mode|
Recall from the last video (tutorial) we saw how
echo displays text, but to edit text
we need a distinct program, similar to a word processor, and for that
Before we start, it helps to think about commands as mini programs and
most follow this structure:
command -option(s) argument(s).
nano command has over
30 options and the argument is the text file you'd
like to edit.
Like most commands, help is available and for
nano it is quite concise.
-v, set the options going
into the program. Instead of expanding on them during this short time,
it's best to spend the time
So why is
nano an important command?
nano is widely available and is
the easiest way to edit text.
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 type
nano and a
text file that I copied from video five.
There we opened it in
less, which is
just a file viewer, not an editor like
See how we're sitting within a separate program, not at the command
nano has its own
functionality. See the control-keystroke combinations here like
Ctrl-X to exit.
Next, let's move this comment up here, to where it belongs, arrow down
Ctrl-K to Cut, arrow up,
Enter a line, UnCut, or paste, using
Ctrl-U, then edit the text so it is
a more accurate comment.
Ctrl-x to leave. It verifies
if you want to save,
Enter to over-write.
Please note, either upper or lowercase works here to leave.
Okay now you know how to use
And you know the syntax for commands, options and arguments.
One last tip about the
whatis command on
nano, and in our next video we'll clear
up the confusion about pico.
Okay, thanks for visiting today. I hope this was a fun introduction
For an overview of the 100 videos, the 8 quizzes, a cheat sheet, the categories and a Q&A section, visit:
The goal is to make learning faster by combining video and text tutorials, so to catch the latest video, subscribe now. Also, follow @factorpad on Twitter for notifications.
echocommand, hit Back.
lncommand, click Next.
A newly-updated free resource. Connect and refer a friend today.