Nano is a super simple, beginner-friendly terminal text editor.
🔹 How to open nano
nano filename
Example:
nano test.txt
- If
test.txtexists โ it opens - If not โ nano creates it
🔹 Nano screen layout
- Top โ File name
- Middle โ Text area (where you type)
- Bottom โ Shortcut keys (very helpful!)
^ means Ctrl
Example: ^O = Ctrl + O
🔹 Most useful nano commands
| Action | Shortcut |
|---|---|
| Save file | Ctrl + O โ Enter |
| Exit nano | Ctrl + X |
| Cut line | Ctrl + K |
| Paste | Ctrl + U |
| Search | Ctrl + W |
| Go to line | Ctrl + _ |
| Undo | Alt + U |
| Redo | Alt + E |
🔹 Example workflow
nano notes.txt
- Type your text ✍️
- Press Ctrl + O โ Enter (save)
- Press Ctrl + X (exit)
🔹 Why people like nano
✅ Easy to learn
✅ No modes (unlike vi)
✅ Commands always visible
✅ Perfect for beginners & quick edits