If you can see this check that

  • Javascript is enabled

The VI editor

The vi editor. This tutorial is completed using the "alice" login.

To reset all the check buttons from a previous attempt click here

Question 1 Enter Text

In the alice account home page, use vi to edit a file called ex1. Insert into this file the following lines.

This is an exercise!
Up, down,
left, right,
build your terminal's
muscles bit by bit

Once edited, you must do a write (:w then return) to write the file so that the checks can find your edits. This is true for ALL the questions in this tutorial.

Tests: Ready
 
First line found in ex1 UNTESTED
2nd line found in ex1 UNTESTED
3rd line found in ex1 UNTESTED
4th line found in ex1 UNTESTED
5th line found in ex1 UNTESTED
First edits complete in ex1 UNTESTED

Question 2 Character Changing

Delete the word "an" from the first line, plus one of the spaces. The line left should read "This is exercise!".

Tests: Ready
 
line check UNTESTED

Question 3 Appending

Add " and byte by byte" to the end of the line "muscles bit by bit".

Tests: Ready
 
line check UNTESTED

Question 4 New file

Create a new file called "ex2". In this file type a number on each line from 1 to 50. Scroll up and down this file. Write the file out to disk.

Tests: Ready
 
file is valid UNTESTED

Question 5 ex2 append

Go to the end of the file and Append the following line of text:

123456789 123456789

Tests: Ready
 
file is valid UNTESTED

Question 6 Cursor moves

If you are in command mode, what character are you on if you move onto the line of ex2 with "123456789 123456789" and then type

^7l
Note this is HAT (e.g. shift 6) then 7 then the CHARACTER l (not a one).

Tests: Ready
 
Effect of ^7l UNTESTED

Question 7 Cursor moves 2

If you are in command mode, what character are you on if you move onto the line of ex2 with "123456789 123456789" and then type

$7h

Tests: Ready
 
Effect of $7h UNTESTED

Question 8 File search

Make sure you are in command mode, and move to the first line of ex2. Search forward for the character 8, then search on again, and then once again. What number is written on this line?

Tests: Ready
 
Effect of 3 times /8? UNTESTED

Question 9 Create ex3

Create a file using vi called ex3. Insert into this file the following lines.

Append text
Insert text
a computer's
job is boring.

Once edited, you must do a write (:w then return) to write the file so that the checks can find your edits.

Tests: Ready
 
First line found in ex3 UNTESTED
2nd line found in ex3 UNTESTED
3th line found in ex3 UNTESTED
4th line found in ex3 UNTESTED
First edits complete in ex3 UNTESTED

Question 10 ex3 pre insert

Add the following line of text ABOVE the first line.

First text

Tests: Ready
 
Edit complete in ex3 UNTESTED

Question 11 ex3 post append

Add the following line of text AFTER the last line.

Last text

Tests: Ready
 
Edit complete in ex3 UNTESTED

Question 12 ex3 move

Move the line "Last text" to line 2 (i.e. between "First text" and "Append text".

Tests: Ready
 
Edit complete in ex3 UNTESTED

Question 13 ex3 edit

Change the last line to read "job was boring" rather than "job is boring".

Tests: Ready
 
Edit complete in ex3 UNTESTED

Centos 7 introPaths | BasicShell | Search
Centos 7 tutorials:intro1 | intro2 | wildcard | permission | pipe | vi | essential | admin | net | SELinux1 | SELinux2 | fwall | DNS | diag | Apache1 | Apache2 | log | Mail
Alma 10 introPaths | BasicShell | Search
Alma 10 tutorials:intro1 | intro2 | wildcard | permission | pipe | vi | essential | admin | net | SELinux1 | SELinux2 | fwall | DNS | diag | Apache1 | Apache2 | log | Mail
Caine 10.0Essentials | Basic | Search | Acquisition | SysIntro | grep | MBR | GPT | FAT | NTFS | FRMeta | FRTools | Browser | Mock Exam
Caine 13.0Essentials | Basic | Search | Acquisition | SysIntro | grep | MBR | GPT | FAT | NTFS | FRMeta | FRTools | Browser | Registry | Mock Exam
Kali 2020-41a | 1b | 1c | 2 | 3 | 4a | 4b | 5 | 6 | 7 | 8a | 8b | 9 | 10
Kali 2024-41a | 1b | 1c | 2 | 3 | 4a | 4b | 5 | 6 | 7 | 8a | 8b | 9 | 10
UsefulPrivacy Policy | Terms and Conditions

Linuxzoo created by Gordon Russell.
@ Copyright 2004-2026 Edinburgh Napier University