0
0
Linux CLIscripting~15 mins

vim basics (insert, command, save, quit) in Linux CLI - Mini Project: Build & Apply

Choose your learning style9 modes available
Vim Basics: Insert, Command, Save, Quit
📖 Scenario: You are learning to use vim, a text editor in the Linux command line. Vim lets you create and edit text files efficiently using keyboard commands.Imagine you want to write a short note in a file, save it, and then exit vim.
🎯 Goal: Learn how to open vim, enter insert mode to type text, switch back to command mode, save your file, and quit vim.
📋 What You'll Learn
Open vim to create or edit a file
Enter insert mode to type text
Return to command mode
Save the file with the correct command
Quit vim properly
💡 Why This Matters
🌍 Real World
Vim is a powerful text editor used by programmers and system administrators to edit configuration files, write code, and take quick notes directly in the terminal.
💼 Career
Knowing basic vim commands helps you work efficiently on servers and development environments where graphical editors are not available.
Progress0 / 4 steps
1
Open vim and enter insert mode
Open vim by typing vim note.txt in the terminal. Then, enter insert mode by pressing the i key so you can start typing text.
Linux CLI
Need a hint?

Type vim note.txt in your terminal and press Enter. Then press i to start typing.

2
Type your note in insert mode
While in insert mode, type exactly: Hello, this is my first vim note.
Linux CLI
Need a hint?

Just type the sentence exactly as shown while in insert mode.

3
Return to command mode and save the file
Press the Esc key to leave insert mode and enter command mode. Then type :w and press Enter to save the file.
Linux CLI
Need a hint?

Press the Esc key to stop typing, then type :w and press Enter to save.

4
Quit vim after saving
While still in command mode, type :q and press Enter to quit vim.
Linux CLI
Need a hint?

Type :q and press Enter to exit vim after saving.