How to edit files on the DCM with PuTTY and vi

This article gives basic instructions for how to edit files on the DCM from a Windows machine using PuTTY to connect and vi to edit the file.

Tools needed:

PuTTY: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

Instructions:

Connect to the DCM with PuTTY using the supplied username and password.

At the prompt type:

vi <filename>

Use the arrow keys to navigate to where you want to edit.

To delete individual characters:

Press the <x> key

To delete a line:

Press the <d> key twice

To insert characters at the cursor position:

Press the <i> key to begin 'Insert Mode'

Type your character(s)

Press the <ESC> key to end 'Insert Mode'

To save your file and exit vi:

Press the <:> key (colon)

Type the characters wq: and hit enter

To just exit vi:

Press the <:> key (colon)

Type the q! characters and hit enter

 

For a more instructions for the vi program see:

https://devhints.io/vim