Challenge - 5 Problems
Nano Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
What is the output of the nano command when opening a new file?
You run the command
nano newfile.txt in a terminal where newfile.txt does not exist. What will nano display?Linux CLI
nano newfile.txt
Attempts:
2 left
💡 Hint
Think about what happens when you open a file that doesn't exist in nano.
✗ Incorrect
Nano opens a new empty buffer for the file and shows "New Buffer" at the top. It does not error or prompt before creating the file.
💻 Command Output
intermediate1:00remaining
What happens when you press Ctrl+O in nano?
While editing a file in nano, you press
Ctrl+O. What does nano do?Attempts:
2 left
💡 Hint
Ctrl+O is often used for output or saving in editors.
✗ Incorrect
Ctrl+O in nano writes the current buffer to the file and asks for the filename to save as, defaulting to the current file.
🔧 Debug
advanced1:30remaining
Why does this nano command fail to open the file?
You run
nano /root/secret.txt as a normal user and get a "Permission denied" error. Why?Linux CLI
nano /root/secret.txt
Attempts:
2 left
💡 Hint
Consider Linux file permissions and user privileges.
✗ Incorrect
The /root directory is restricted to the root user. Normal users cannot open files there without sudo or root access.
🚀 Application
advanced1:30remaining
How to search for a word in nano?
You want to find the word "apple" in a file opened with nano. Which key combination do you press and what do you type next?
Attempts:
2 left
💡 Hint
Ctrl+W stands for 'Where is' in nano.
✗ Incorrect
Ctrl+W opens the search prompt in nano. You then type the search term and press Enter.
🧠 Conceptual
expert1:30remaining
What is the effect of pressing Ctrl+X in nano when unsaved changes exist?
You have edited a file in nano but not saved it yet. You press
Ctrl+X to exit. What happens next?Attempts:
2 left
💡 Hint
Think about how editors protect your work.
✗ Incorrect
Nano prompts to save changes if there are unsaved edits before exiting to prevent data loss.