01 / 08
Every server has it
The last chapter at last. vi first.
Until now, to make a file, you have written this.
echo '#!/bin/sh' > check.shecho 'ip link ...' >> check.shA line at a time. Get it wrong and you start again.
want to mend line 3 -> type the whole thing once moreThat is hard going. So you need an editor.
Hence vi.
> vi is on every server there is
That is the first reason for learning it.
a server you have just rented vi is therea Linux built as small as possible vi is therea machine half broken, being mended vi is thereOther, handier editors have to be installed first. And a machine with no network cannot even install one. In such a place, vi is the last thing you can lean on.
There is another reason.
I want to mend one line of a settings fileThat kind of work is very common in practice. Open, mend one line, save, get out. Do that and nine cases in ten are covered.
What this lesson teaches is the most important part of it — how to get out for certain. The way back, before the skill.