vi command

Posted on 2012-09-17
Last Modified: 2012-09-17
what is the vi command to come to top of the opened text file, for going all the way to bottom i type :ctrl+G and fo going all the way to top of the page or line 1 of the file, what is the vi command
Question by:wasman
    LVL 12

    Accepted Solution

    Here is a list of the vi commands:

    The command you are looking for is H

    Author Comment

    for going to last line of the file , i use esc+shift+G,
    what is the command i need to use for going to first line of the file, esc + shift+ H takes me to top of the screen, but i need to go first line of the file.

    Author Comment

    i see it now , it's  esc+ 1G

    Author Closing Comment

    Thanks you
    LVL 12

    Expert Comment

    Whoops, sorry, yes 1G, and I think :0 also works.
    LVL 31

    Expert Comment

    For going to the top do


    in the command mode



    to go to the last line

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
    I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension ( This reminded me of questions tha…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now