In this video, you'll learn about editors.
So why are editors so important?
Well, that's because Linux configuration happens by modifying text files.
Plain ASCII text is used for many files.
And you will find other formats as well, like YAML, which is a common configuration format
used in Ansible, for instance, or JSON, which is often used as a data storage format, or
XML, which can be used as an alternative to store data as well.
And to edit all these types of files, you use an editor.
Editors can modify text files without adding any formatting code.
And common editors on Linux are Nano and Vim.
Nano has the advantage that it is easy.
And Vim is more advanced, and it allows you to edit text files in a programmatic way.
So even if Vim is more advanced, I can understand if you want to use Nano.
So let's talk about Nano a little bit before I'm trying to convince you and tell you that
Vim is really a smarter choice.
So Nano is easy to use.
And you shouldn't waste your time on editing if you're new to Linux, and there's a mountain
of new topics that you need to master.
So it's OK if you want to use Nano.
The good thing about it is that after starting it, you can start editing text immediately.
And commands in Nano are shown as keyboard shortcuts in the lower part of the screen.
Let me show you.
So let me use Nano MyFile, which is opening Nano, and which will create a file with the
name MyFile.
And here you can see the Nano interface, within the lower part, all the keyboard controls.
If it starts with a caret, that replaces Control.
If it starts with M, M is Meta key, and that's normally the Alt key.
So I can start typing my text.
And once I'm done, just use Control X.
And Control X is asking if you want to save the modified buffer using Yes, and then it's
prompting the file name that you want to write, and press Enter, and then you're done.
And LS is showing that MyFile was just created.
So that's easy, but it's not very powerful.
And if you want real power, you should learn about Vim anyway.
My recommendation, invest some time, get used to it.
It might take a while, but on the long term, you'll be happy if you learn Vim because of
all of its powers.