Unix and Vi(m)
Overview
Unix is an operating system that is core to a lot of work that computer programmers end up doing and Vi(m) is a text-editing program that you will likely find yourself suddenly thrust into (because Git uses it, another tool you’ll learn in this class). Today’s class is focused on getting familiar with these two tools so that you can use them this term.
Basic Learning Objectives
Before class, you should be able to:
- Recognize basic commands in a UNIX system
- Recognize basic Vi(m) commands (text insertion, deletion, quitting)
Advanced Learning Objectives
After class, you should be able to:
- Navigate around a UNIX system
- Use a Vi(m) editor
Readings
To achieve the basic learning objectives, you can work through the following, ideally on your own machine, but you can also complete these in Olin 310/304/308:
- UNIX Tutorial for Beginners.
- Definitely go through Tutorial One and Tutorial Two
- Three, Four, and Five are good things to look through as well, or you can reference them in class
- One of the following vi / vim tutorials. You don’t need to make it through all of any of these; you should just make sure that you know how to do basic text insertion and deletion in Vim, and quit out of it!:
- VIM adventures – a game
- Openvim.com – an interactive tutorial
- Unix/Linux - The vi Editor Tutorial – a classic-style tutorial from Tutorials Point
Checks
Submit answers to the following on Moodle:
- What are the commands for inserting text, deleting text and quitting out of Vi(m)?
- What Unix command would get you to your home directory regardless of where you currently are?
- Do the following and then take a screenshot of your Terminal and upload it to Moodle:
- Create a directory named
checkup - Go into that directory
- Create an empty file named
success.txt - List the files to show your new file exists
- Print your working directory
- Create a directory named