Bird
0
0

You want to create a new file and write "Hello World" in nano, then save and exit. Which is the correct sequence?

hard📝 Application Q9 of 15
Linux CLI - Viewing and Editing Files
You want to create a new file and write "Hello World" in nano, then save and exit. Which is the correct sequence?
ARun 'nano newfile.txt', type text, Ctrl + X, Ctrl + S
BRun 'nano newfile.txt', type text, Ctrl + S, Ctrl + Q
CRun 'nano newfile.txt', type text, Ctrl + O, Enter, Ctrl + X
DRun 'nano newfile.txt', type text, Ctrl + C, Ctrl + O
Step-by-Step Solution
Solution:
  1. Step 1: Open new file with nano

    Use 'nano newfile.txt' to create or open file.
  2. Step 2: Type text, save, and exit

    Type "Hello World", save with Ctrl + O, confirm with Enter, then exit with Ctrl + X.
  3. Step 3: Check other options

    Ctrl + S and Ctrl + Q do not save and exit in nano, Ctrl + C cancels, Ctrl + X before saving loses changes.
  4. Final Answer:

    Run 'nano newfile.txt', type text, Ctrl + O, Enter, Ctrl + X -> Option C
  5. Quick Check:

    Create, save, exit = Ctrl + O, Enter, Ctrl + X [OK]
Quick Trick: Save with Ctrl + O, then exit Ctrl + X [OK]
Common Mistakes:
  • Using Ctrl+S to save
  • Exiting before saving
  • Using Ctrl+C to cancel instead of exit

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes