HPC Grid Tutorial: How to Edit Text Using Nano Text Editor

Follow these steps to use the Nano Text Editor. 

Watch the video tutorial here!

1. Log on to the Grid.

2. Use nano to modify one of your files. The text file Grid_User is used in this example. Type: nano filename 

You will now see the text of the original file. 

3. Text can be easily inserted by moving around in the document with the arrow keys to the desired place. In this example, one sentence was added beneath the previous text. 

4. When you are finished editing there are two ways to save the documents. 

  • You can choose to write the changes to the file. To do this, press Ctrl and O. (Note: This is listed on the bottom of the screen (^O Write Out), where the carat sign '^' stands for the control key.) You can save this way if you want to save but not exit just yet. A screen will appear asking you the name you want to save the file as. Press enter when finished.

  • Another way is to quit nano: press Ctrl and X. If you haven't saved, then you will be prompted to do so if you like. Press "Y" to save and "N" not to save. To cancel and return to the document, press Ctrl and C. Once you choose to save, you will be prompted as to what name to save it as. Press enter once inputting.

5. You have now edited a file and saved it.