Unit 1 Bonus - VIM Fundamentals for Linux Sysadmins
Note
This is an optional bonus section. You do not need to read it, but if you're interested in digging deeper, this is for you.
Module 1: Getting Started (Days 1-2)
Day 1: First Contact with VIM
Segment 1: The Basics
- Complete first section of
vimtutor - Learn essential commands:
vim filename- Open/create filei- Enter insert mode (before the cursor)a- Enter insert mode (after the cursor)Esc- Return to normal mode:w- Save changes:q- Quit:wqorZZ- Save and quit:q!- Quit without saving
Segment 2: Building Muscle Memory
- Create five different files
- Practice mode switching 50 times
- Write and save content in each file
- Practice recovering from common mistakes:
- Accidentally pressed keys in normal mode
- Forgot to enter insert mode
- Trying to quit without saving
Segment 3: First Real Task
- Create a simple bash script template
- Add standard sections:
- Shebang line
- Comments
- Basic variables
- Simple functions
- Save and reopen multiple times
Day 2: Comfort Zone
Segment 1: More Basic Operations
- Complete second section of
vimtutor - Practice quick save and exit combinations
- Learn to read VIM messages and errors
- Understand modes in depth:
- Normal mode
- Insert mode
- Visual mode (introduction)
Segment 2: Error Recovery
- Create deliberate errors and fix them:
- Write without insert mode
- Exit without saving needed changes
- Get stuck in different modes
- Practice until you can recover without thinking
Segment 3: Real Config Practice
- Copy
/etc/hostsfile - Make various modifications:
- Add new host entries
- Modify existing entries
- Add comments
- Save different versions
Module 2: Navigation (Days 3-4)
Day 3: Basic Movement
Segment 1: Core Movement Commands
- Master the basics:
h- Leftj- Downk- Upl- Rightw- Next wordb- Previous word0- Line start$- Line end^- First non-blank character of the lineg_- Last non-blank character of the line
Segment 2: Movement Drills
- Create a "movement course" file
- Practice moving between marked points
- Time your navigation speed
- Compete against your previous times
Segment 3: Applied Navigation
- Navigate through
/etc/ssh/sshd_config:- Find specific settings
- Move between sections
- Locate comments
- Jump to line numbers
Day 4: Advanced Movement
Segment 1: Extended Movement
- Learn efficient jumps:
gg- File startG- File end{- Previous paragraph}- Next paragraphCtrl+f- Page downCtrl+b- Page up
Segment 2: Speed Training
- Work with a large configuration file
- Practice jumping between sections
- Find specific lines quickly
- Navigate through code blocks
Segment 3: Real-world Navigation
- Work with system logs
- Jump between error messages
- Navigate through long configuration files
- Practice quick file browsing
Module 3: Essential Editing (Days 5-7)
Day 5: Basic Editing
Segment 1: Edit Commands
- Master core editing:
x- Delete characterdd- Delete lineyy- Copy linep- Paste afterP- Paste beforeu- UndoCtrl + r- Redos- Substitute a characterr- Replace a characterc- Change character
Segment 2: Editing Drills
- Create practice documents
- Delete and replace text
- Copy and paste sections
- Practice undo/redo chains
Segment 3: System File Editing
- Work with
/etc/fstabcopy:- Add mount points
- Remove entries
- Comment lines
- Fix formatting
Day 6: Intermediate Editing
Segment 1: Combined Commands
- Learn efficient combinations:
dw- Delete wordd$- Delete to line endd0- Delete to line startcc- Change whole linecw- Change wordD- Delete to line endC- Change to line end
Segment 2: Practical Application
- Edit service configuration files
- Modify system settings
- Update network configurations
- Clean up log files
Segment 3: Speed Challenges
- Timed editing tasks
- Configuration file cleanup
- Quick text transformation
- Error correction sprints
Day 7: Editing Mastery
Segment 1: Advanced Operations
- Master text objects:
ciw- Change inner wordci"- Change inside quotesdi(- Delete inside parenthesesyi{- Yank inside bracesca"- Change a quotes blockda{- Delete a{}blockya(- Yank a()block
Segment 2: Integration Practice
- Combine all learned commands
- Work with multiple files
- Practice common scenarios
- Time your operations
Daily Success Metrics
By end of each day, you should be able to:
- Day 1: Open, edit, save, and exit files confidently
- Day 2: Understand and recover from common errors
- Day 3: Navigate small files without arrow keys
- Day 4: Move through large files efficiently
- Day 5: Perform basic edits without hesitation
- Day 6: Combine movement and editing commands
- Day 7: Edit configuration files with confidence
Practice Tips
- Use
vimtutorduring breaks - Disable arrow keys completely
- Keep a command log of new discoveries
- Time your editing operations
- Practice with real system files (copies)
Remember: Focus on accuracy first, then build speed.