0
0
Linux CLIscripting~15 mins

nano text editor in Linux CLI - Mini Project: Build & Apply

Choose your learning style9 modes available
Basic Text Editing with Nano Editor
📖 Scenario: You are working on a Linux server and need to create and edit a simple text file using the nano text editor. This is a common task for writing notes, scripts, or configuration files.
🎯 Goal: Learn how to create a text file, add content, save it, and exit the nano editor using basic commands.
📋 What You'll Learn
Create a new text file named notes.txt using nano
Write the exact text: Hello, Nano! inside the file
Save the file using the correct keyboard shortcut
Exit the nano editor
Display the contents of notes.txt to confirm the text
💡 Why This Matters
🌍 Real World
Editing configuration files, writing quick notes, or creating scripts on Linux servers often requires using simple text editors like nano.
💼 Career
Many IT, DevOps, and developer roles require comfort with command-line text editors to manage files on remote servers.
Progress0 / 4 steps
1
Open a new file with nano
Type the command nano notes.txt to open the nano editor and create a new file named notes.txt.
Linux CLI
Need a hint?

Use nano followed by the file name to open or create a file.

2
Write text inside nano
Inside the nano editor, type the exact text Hello, Nano! on the first line.
Linux CLI
Need a hint?

Just type the text as you would in any text editor.

3
Save the file and exit nano
Press Ctrl+O to save the file, then press Enter to confirm the file name. After saving, press Ctrl+X to exit nano.
Linux CLI
Need a hint?

Use the keyboard shortcuts shown at the bottom of nano to save and exit.

4
Display the contents of the file
Type the command cat notes.txt to display the contents of the file and confirm it contains Hello, Nano!.
Linux CLI
Need a hint?

The cat command shows the file content in the terminal.