New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

CS 100: Week 1 Notes

by: Tucker Ervin

CS 100: Week 1 Notes CS 100

Tucker Ervin
GPA 3.935

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

These notes introduce the commands used to navigate the Unix terminal and the Vim text editor. I also included an example Hello World program.
CS I for Majors (CS 100, Jingyuan Zhang)
Jingyuan Zhang
Class Notes
Computer Science
25 ?




Popular in CS I for Majors (CS 100, Jingyuan Zhang)

Popular in Computer Science and Engineering

This 4 page Class Notes was uploaded by Tucker Ervin on Thursday September 29, 2016. The Class Notes belongs to CS 100 at University of Alabama - Tuscaloosa taught by Jingyuan Zhang in Fall 2016. Since its upload, it has received 9 views. For similar materials see CS I for Majors (CS 100, Jingyuan Zhang) in Computer Science and Engineering at University of Alabama - Tuscaloosa.


Reviews for CS 100: Week 1 Notes


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 09/29/16
CS 100 Notes: Week 1: No real coding was done this week, but the professor did explain how to navigate a Unix interface terminal and how to use the Vim text editor. He also taught us how to program our first “Hello World”. Being familiar with the Unix terminal is extremely important for this class and programming in general. Without a good knowledge of how to navigate it, you will have trouble come exam time, because the only program they allow for coding is the terminal. Unix Commands to Know:  ls – lists files and directories in the current working directory. o ls  rm – short for remove, removes the file you pass it. o rm foo.txt (Removes foo.txt)  cd – moves from one directory to the one you give it. o cd (Returns you to home directory). o cd directory/anotherdirectory (Moves you to anotherdirectory)  mv – moves a file from one place to another. o mv foo.txt directory/anotherdirectory (Moves foo.txt to anotherdirectory). o mv foo.txt foo2.txt (Renames foo.txt to foo2.txt).  pwd – lists your current working directory o pwd  vim – opens the vim text editor o vim foo.txt (Opens the file foo.txt for editing). o vimtutor (Opens an interactive vimtutor for you to learn more about using Vim).  gcc – compiles C programs o gcc –Wall myprogram.c (Compiles myprogram.c and makes an executable “a.out”).  ./a.out – runs your compiled program o ./a.out Vim Commands to Know: First off, Vim has two important modes: Normal mode and Insert mode. Normal mode is where you can input Vim commands. Insert mode is where you can actually type in text.  h, j, k, l – movement keys o h – moves cursor left o j – moves cursor down o k – moves cursor up o l – moves cursor right  i, a – insertion keys o i – allows you to insert text before the cursor, placing you into insert mode. o a – allows you to insert text after the cursor, placing you into insert mode.  Esc – escape key o Esc – returns you to normal mode where you can input Vim commands  u – undoes any changes o u – undoes a single change o U- undoes all the changes on a line.  dd – deletes a line  p – puts any text that was just deleted directly under the cursor.  :w – writes any changes you made to file o :wq – writes any changes you made to the file and then quits to terminal. C Definitions That You Need to Know:  #include <file.h> - includes a library into your program so you can use its functions o <stdio.h> - the library that has all the standard input/output functions you will need.  int – declares a variable or function of the integer type  main(void) – the function every program needs to run  printf(“words”); - a function that prints whatever you give it to the terminal.  \n – this represents a newline character.  return 0; - returns 0 for the main function, which ends the program. Example Hello World: #include <stdio.h> int main(void){ printf(“Hello World!\n”); return 0; }


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

Janice Dongeun University of Washington

"I used the money I made selling my notes & study guides to pay for spring break in Olympia, Washington...which was Sweet!"

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"


"Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.