The nano text editor
Until now, we have used single purpose commands to achieve very basic goals such as creating empty files and directories. In the Linux Shell, there is more to life than simple commands. There are actually complete programs, which are able to run completely within your shell window. One example is nano, which is a text editor. There are many text editors available (such as vi
and emacs
), but nano
is quite possibly the easiest to learn when starting out. There are two ways to open the nano
text editor. The first way is by simply entering the nano
command in the terminal.
The nano
text editor immediately opens and you are able to start typing. However, when you enter the nano
command by itself, you aren't actually editing a file until you save it. To save the file, press Ctrl + O (the letter O) and you are prompted to save the file. If you simply type the name, such as myfile.txt
, the file will be saved to wherever your current working directory is. For example, if your...