Week 1 Day 2 - UNIX and Vim Basics; Hello World

Channel:
Subscribers:
2,640
Published on ● Video Link: https://www.youtube.com/watch?v=TmPsWySt6kc



Duration: 1:10:13
497 views
5


Today we went over the five basic UNIX commands that we'll be using this class:
1) ls - list files and folders
2) cd - change directories
3) vim main.cc - edit a file called main.cc
4) g++ main.cc - compile main.cc to an executable named a.out
5) a.out - runs your program


You will do steps 3 through 5 over and over in a loop. If you're on my server, use "compile" instead of g++. It runs various static analysis tools to find extra bugs for you.


I **HIGHLY** recommend you run through the first three chapters of the Surrey UNIX tutorial as it will help a lot in this class and in future endeavours in STEM.



To use Vim, at a minimum you need three commands:
1) i - Puts you in insert mode
2) ESC - Puts you back into command mode
3) shift-ZZ - In command mode, will save and quit


We then wrote Hello World (the timeless classic), compiled it, and ran it. I added some emoji for fun (Windows Key + . brings up the emoji keyboard).







Tags:
csci 40
hello world
c++
UNIX
vim