Skip to content

vi Editor

View a file

  1. Open a file:
    vi <file name>
    
  2. Close the file by typing :q and press ENTER

Edit/Create a file

  1. Open or create a file:
    vi <file name>
    
  2. Press i to activate the insert mode
  3. Navigate to the right location using the arrow keys:
  4. Modify or add some content

    Note

    Use Ctrl Shift + c and Ctrl Shift + v for copy/paste content in the vi editor`.

  5. Press ESC to exit the insert mode

  6. Store and close the file by typing :wq and press ENTER