✍️ Linux/Unix: Editors & Help Tools – vi, nano, man & More for Every User
🧲 Introduction – Edit and Explore with Confidence
Every Linux user eventually needs to edit configuration files and look up command documentation—often without a GUI. Whether you’re writing a script, fixing a config, or just learning a command’s syntax, mastering command-line editors like vi, nano, and help tools like man, info, and whatis is crucial for efficiency and self-sufficiency.
🎯 In this guide, you’ll learn:
- How to use
vi/vimandnanoeditors in the terminal - What tools help you look up command info (
man,info,--help, etc.) - When to use
which,type,whatis, andaproposto find or verify commands
📘 Topics Covered
| 🔵 Category | 📖 Description |
|---|---|
| vi/vim Editor Basics | Learn modes, navigation, editing, and saving in vi/vim |
| Other Editors | Use simpler or GUI editors like nano, gedit, and emacs |
| Manuals & Help Tools | Access man, info, and --help for command syntax and options |
| Command Lookup Tools | Discover what a command does, where it’s located, and how to use it |
🔵 Linux/Unix: vi/vim Editor Basics
🔹 Launch & Modes
vi filename
✅ vi starts in normal mode. Press i to enter insert mode, and Esc to return to normal mode.
🔹 Common Commands
| Mode | Command | Action |
|---|---|---|
| Normal | :w | Save (write file) |
| Normal | :q | Quit |
| Normal | :wq | Save and quit |
| Insert | i, a | Insert before/after cursor |
| Navigation | h j k l | Move left/down/up/right |
🔹 Delete, Copy, Paste
dd # Delete a line
yy # Copy a line
p # Paste below
🔵 Linux/Unix: Other Editors (nano, gedit, emacs)
🔹 nano – Simple CLI Editor
nano file.txt
✅ Beginner-friendly editor with on-screen shortcuts.
| Shortcut | Description |
|---|---|
CTRL+O | Write (save) file |
CTRL+X | Exit editor |
CTRL+K, CTRL+U | Cut & uncut line |
🔹 gedit – Graphical Editor (GNOME)
gedit file.txt &
✅ GUI editor for desktop environments.
🔹 emacs – Advanced Programmable Editor
emacs file.txt
✅ Ideal for power users who want customization and scripting.
🔵 Linux/Unix: Manuals & Help (man, info, –help)
🔹 man – Manual Pages
man ls
✅ Displays detailed documentation, flags, examples.
🔹 info – Enhanced Docs (with hyperlinks)
info coreutils
✅ Navigate using arrows and Enter, great for GNU commands.
🔹 --help – Quick Command Guide
ls --help
✅ Shows usage, options, and flag explanations quickly.
🔵 Linux/Unix: Command Lookup (type, which, whatis, apropos)
🔹 type – Built-in or External?
type cd
✅ Tells whether a command is a shell built-in or binary.
🔹 which – Find Executable Path
which python3
✅ Displays the full path to the binary.
🔹 whatis – One-Line Description
whatis ssh
✅ Displays brief info about a command.
🔹 apropos – Search All Manpage Descriptions
apropos network
✅ Finds commands related to a given keyword.
📌 Summary – Recap & Next Steps
Linux equips you with versatile tools to edit files and explore command syntax from the terminal itself. By combining editors like vi and nano with help tools such as man, info, and type, you become a more independent and capable user or sysadmin.
🔍 Key Takeaways:
- Use
vifor powerful editing andnanofor simplicity - Access
manfor full documentation and--helpfor quick references - Use
type,which, andaproposto locate or understand commands
⚙️ Real-World Applications:
- Edit cron jobs or shell scripts directly on remote servers
- Debug command usage with built-in help options
- Identify command sources to avoid aliasing issues
❓ Frequently Asked Questions
❓ What is the difference between vi and vim?
✅ vim stands for Vi IMproved—it adds syntax highlighting, undo levels, and plugins. Both share the same command structure.
❓ How do I save and quit in vi?
✅ Press Esc to go to normal mode, then type:
:wq
❓ Is nano easier for beginners?
✅ Yes, nano shows all shortcuts at the bottom and doesn’t require mode switching like vi.
❓ When should I use apropos?
✅ Use it when you don’t remember the command but know what you want to do:
apropos permission
❓ How can I find out what a command does?
✅ Use:
whatis command_name
Or get full docs with man.
Share Now :
