Create lab exercise environment
After realizing the basic function of vi editor, now we’ll proceed the vi editor practice. Here we use the file content in /etc/services for vi practice sample, but to avoid resulting in system error, please copy /etc/services to /tmp first.
Now let’s see how to start vi to edit files.
Just type in vi to start vi then we can open an old file or start a new file to edit. We can also type in “:e /tmp/services” to see the file contents of /tmp/services.