Goal
• Practice using the vi editor.
Notes:
• Remember the “modes” in the vi editor.
• You may use the “Escape” key to return to command mode if you get confused and need
to start over.
Submission Instructions
• Take screenshots for each step you perform and write down the correct
command corresponding to each step number. Submit this in a PDF file.
Task: vi Practice on Kali Linux (20 * 5 = 100 points)
Open the terminal in your VM, then complete the following tasks. Please take the screenshots
of all the necessary commands that you execute for each step and submit the screenshots
with their step number in a pdf file.
NOTE: You may write the correct vi editor commands, if screenshot is not applicable. Please see
the note added to some steps below.
1. Copy the file /usr/share/doc/zstd/copyright to your home directory. Screenshot
2. Perform a long list in your home directory using the correct command. Screenshot
3. Open the file copyright in a vi-editor using vi command. Screenshot
4. Move to line 15, then insert your MIDAS ID in the same line with the following format:
****XXXX****(replace XXXX with your own MIDAS name). Screenshot + Write
Command.
5. Return to the command mode. Write Command
6. Open a new line below the current line using correct command (please refer to slides
with the list of commands used in vi editor). Screenshot + Write Command.
7. Return to the command mode. Write Command
8. Use command to Insert “****XXXX ****” five times. Screenshot + Write Command
9. Use command to return the top of the file. Screenshot + Write Command
10. Move forward three sentences. Screenshot + Write Command
11. Move forward four words. Screenshot + Write Command
12. Search for the word example or any word existing in the document that you are using
for lab-3. Screenshot + Write Command
13. Continue to the next occurrence of the search term example. Screenshot +
Write Command
14. Delete the current word, example. Screenshot + Write Command
15. Delete the current line. Screenshot + Write Command
16. Use command to jump to the end of the file. Screenshot + Write Command
17. Copy line 16 and paste the text at the end of the document. Screenshot + Write
Command
18. Replace all occurrences of http with HTTP throughout the document. Screenshot +
Write Command
19. Save and quit the document. Screenshot + Write Command
20. Rename the file copyright to copyright_cyse270. Screenshot + Write Command
Please note:
Make sure you highlight and annotate important information.
Reflection
In this assignment I was able to utilize commands to navigate directories, list files, copying, renaming, and deleting files. Overall, this lab was a great way to practice commands for file management tasks