Lab 0: Environment Set up

Due Sunday January 29th @ 11:59 PM

The goal of this labs is to get your SEED Labs VM set up. You will be using this virtual machine for all your labs during this semester, so it's important you get it set up correctly. You will also write a very basic hello program in C and Python, and demonstrate that you can run these programs from the command line.

Lab Tasks

Task 1: Fill out the course questionnaire

Fill out the course questionnaire. It can be found here: https://forms.gle/6VUmcpawy5AHwGfw8

Task 2: Join the Discord server

Join the discord server, give yourself the CSCI 476 tag ( !join-476), and change your nickname to your name (ex. Reese Pearsall or Reese P).

Task 3: Setting up and configuring your VM

Follow the instructions for setting up the VM. The instructions can be found here: https://github.com/seed-labs/seed-labs/blob/master/manuals/vm/seedvm-manual.md

We also went through these steps during lecture on 1/20. You can watch the recording for help.

Once you configure and boot up your VM for the first time, you should see a screen like this:

The username is seed and the password is dees (seed spelled backwards).

Once you see the desktop, you should have your VM ready to go!

Task 4: Writing and Running a basic Hello World C Program

We will be doing lots of work with C programs this semester, so in this task you will demonstrate that you can write a basic C program, compile it, and execute it all via the command line

Open up a new terminal instance, and make a new directory called lab0 using the mkdir command. Then move into your new directory using the cd command. Once you are inside your lab0/ folder, its time to create a C file.

You can use any text editor (VI, VIM, Nano, Linux GUI file editor) to write the C program. The code below is the source code for a very basic "Hello World" program:


Save the program, and then return to the command line. It's time to compile! We will be using the GCC compiler to compile our C programs. Run the following command to compile your C program:

gcc hello_world.c -o hello_world

We now have an executable file (hello_world). We can now run it by typing:

./hello_world

You should then see "Hello world" being printed out in your terminal. Congratulations. Take a screenshot/snippet of VM. This screenshot should include you creating, compiling, and running your C program.

Task 5: Writing and Running a basic Hello World Python Program

We will be using Python as well in class. In this task, we will write and run a basic "Hello World" Python program all via the command line


Use a text editor to create a hello_world.py file and insert the following code:

pretty crazy stuff, I know. Python is not a compiled language, so we dont need to compile it like we did with the C program

To run it, we run the command: python3 hello_world.py

You should then see "Hello world" being printed out in your terminal. Congratulations. Take a screenshot/snippet of VM. This screenshot should include you creating and running your python program.

Submission

Take your two screenshots, and paste them into a single word document and save it as a pdf. Name your file to [FirstNameLastName]-Lab0.pdf and submit it to the correct D2L submission box.