Linux Basics

16 / 87
   

Create Text File Using Nano

You can use a text editor to edit or create a text file. There are many editors in Linux such as nano, pico, vi, emacs. Let's try to use nano for creating a file

  1. Launch nano to edit:

    nano myfirstfile.txt
    
  2. Type the following text into it:

    He walked into his exile
    
  3. Press Control+x and afterward press "y" to Save Changes

  4. Hit enter to exit the nano editor

In case, you are stuck, please see this video: Demo - Create Text File Using Nano - Video