Learn to edit text files at the Linux command line.
Linux nano command summary with examples (3:54)
Videos can also be accessed from the YouTube Playlist.
Our twentieth word, or command to memorize is
nano from the category
nano allows you to edit text files.
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 here.
echocommand, hit Back.
lncommand, click Next.