Skip to main content

Posts

Showing posts from November, 2026

Linux vim/vi switch from 1st line to the last line

In Linux vim or vi is a must tool to learn on the command line. Editing .conf or configuration file, checking .log files or editing scripts and other tasks that requires editing will need to a vi or vim to read and edit. However, nano text editor is another version that is quite straight forward to use as well for text editing.  It is still good to have a vi/vim on a skill set of sysadmins, since vim or vi was already in Linux or Unix system before nano was introduced. Editing, checking or viewing a large file requires navigation. Of course, arrow keys are their tom move forward, upward or whatever direction is needed. Viewing 1000 or more lines and using arrow keys to move from 1st line to the last line will take sometimes if only arrow up and arrow down will be used. In vi / vim to quickly navigate from 1st line to last line no matter how big the file is can easily be done using some commands. Open a text file with number of lines using vim. Using :1, or :$ is the command to swit...