How to create or edit a file in linux (using vi)
  1. At the command prompt enter
    vi /path/filename

    examples:
    vi /root/.OneDesk
    vi /etc/yum.repos.d/repo.onedesk.com_repo.repo

  2. Press i on your keyboard to switch to insert mode in the file

  3. Edit the file as required

  4. Press the Esc key to exit from input mode.

  5. Save the changes with the following command
    :wq