0
0
Linux CLIscripting~5 mins

nano text editor in Linux CLI - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the nano text editor used for?
Nano is a simple, easy-to-use text editor in the Linux command line. It helps you create and edit text files quickly without complex commands.
Click to reveal answer
beginner
How do you open a file named notes.txt with nano?
Type nano notes.txt in the terminal and press Enter. This opens the file in nano for editing.
Click to reveal answer
beginner
What key combination saves your changes in nano?
Press Ctrl + O (the letter O) to write out or save the file. Then press Enter to confirm the file name.
Click to reveal answer
beginner
How do you exit nano after editing?
Press Ctrl + X to exit. If you have unsaved changes, nano will ask if you want to save before quitting.
Click to reveal answer
intermediate
What does Ctrl + K do in nano?
It cuts (removes) the current line and saves it to a buffer, so you can paste it somewhere else with Ctrl + U.
Click to reveal answer
Which command opens a file named example.txt in nano?
Aedit example.txt
Bnano example.txt
Copen example.txt
Dvi example.txt
How do you save changes in nano?
ACtrl + Q
BCtrl + S
CCtrl + X
DCtrl + O
What happens if you press Ctrl + X with unsaved changes?
ANano exits immediately without saving
BNano deletes the file
CNano asks if you want to save changes
DNano opens a new file
Which key combination cuts the current line in nano?
ACtrl + K
BCtrl + C
CCtrl + X
DCtrl + V
How do you paste a cut line in nano?
ACtrl + U
BCtrl + V
CCtrl + Y
DCtrl + P
Explain how to open, edit, save, and exit a file using nano.
Think about the basic workflow of editing a file in nano.
You got /5 concepts.
    Describe how to cut and paste lines inside nano.
    Focus on the key commands for moving lines around.
    You got /4 concepts.