Skip to content

GNULinuxClub

  • Home
  • Linux
    • Linux Basics
    • Command Line
    • Troubleshooting
    • System Admin
    • Networking
  • Databases
  • Engineering

comment VI editor

How to Comment Lines in vi

October 16, 2026October 6, 2008 by Gaurav Masand

In vi or vim, you can comment a range of lines by using a substitution command. This is handy when editing shell scripts, configuration files or temporary notes. Comment every line in the file Open the file in vi, press Esc, then run: This adds # at the start of every line. Use a different … Read more

Categories Command Line Tags comment VI editor Leave a comment

Recent Posts

  • Who Thought Banks Would Move from Oracle to PostgreSQL?
  • Back Up an Oracle Schema with Data Pump
  • Recover or Reinstall the GRUB Bootloader
  • Download Files from a Directory with wget
  • How to Check Directory Size in Linux Using du

Recent Comments

No comments to show.

All Notes  ยท  About

© 2026 GNULinuxClub • Built with GeneratePress