How to comment out multiple lines at once in vim

My name is Ito and I am an infrastructure engineer.
When editing files on Linux, I often use "Vim".
When working with configuration files,
there may be times when you want to comment out multiple lines at once to comment out unnecessary settings.
This time I would like to introduce you to how to do this
Use rectangular selection mode
For operations on multiple lines, use the "Rectangle Selection Mode."
Open the file in vim and enter the following command:
ctrl + v
Enter "Visual Rectangle Mode"
and with your cursor select the line you want to comment out.
I (shift + i)
This is "insert mode."
Enter the character to comment out (such as "#")
Esc
Exit insert mode
I've put it all together in GIF

Looks like
a comment has been inserted at the beginning!
Let's try our best to become proficient in Vim
0