The goals for this lab assignment are:
update21
and handin21
commandsWork through the following sections and ask if you have questions!
Start by reading through all of the class web page!
Pay special attention to the Schedule, Academic Integrity, and How to succeed in CS21 sections!
You should get into the habit of checking the class page weekly. The class topics, lab assignments, weekly readings, and announcements will be posted to the class schedules each week.
From the CS homepage, please read these important pages:
update21
Our update21
command copies any files your professors want you to have from them to your cs21
directory. It’s a good habit to run update21
each time you log in. If you haven’t run it already, this will create your cs21/labs/00
directory.
Open a terminal window (click the icon) and enter the commands below after the unix prompt (the dollar sign):
$ update21 # creates cs21 directory, with labs/00 dir below
$ cd cs21/labs/00 # cd into the correct directory for lab 00
$ pwd # check to see that you are in the correct directory.
# if yes, it will print /home/your_username/cs21/labs/00
Read through our UsingUnix web pages and try the various unix commands. These pages are just to help you get comfortable with the unix command line (there’s nothing you have to write or turn in). Make sure you understand the following commands:
ls
list out filescd
change directorypwd
print working directory (where you are)passwd
change your CS passwordless
show contents of file (one page at a time)cat
show contents of file (all at once)mv
move/rename a filerm
remove a filecp
copy a filessh
secure shell (how to connect to the CS machines)man
view the manual and options for any commandBeginning this Thursday or Friday we will start using the text editor in class, so you need to at least know the basics.
All professors teaching this course will utilize atom.
To practice with atom, open up the fixme-gb.txt
file in your cs21/labs/00
directory and fix the 5 errors in that file.
$ cd cs21/labs/00
$ atom fixme-gb.txt
Here’s a list of keyboard shortcuts to help you learn the atom text editor. Make sure you at least know how to open a new file, add text, and then save it to the correct directory.
bio.txt
fileFor more practice with editing, and so we can learn a little about you, edit the bio.txt
file in your cs21/labs/00
directory:
$ atom bio.txt
Note: this file should have a few simple questions in it for you to answer. If you don’t see those questions, make sure you are in the cs21/labs/00
directory (i.e., run the pwd
command), and/or run the update21
command to make sure you get the initial file from your professor.
handin21
Once you are satisfied with your bio.txt
file, hand it in by typing handin21
at the unix prompt.
You may run handin21
as many times as you like. Each time you run it, new versions of your files will be submitted (i.e., any files you’ve made changes to). Running handin21
after you finish a program, after any major changes are made, and at the end of the day (before you log out) is a good habit to get into.
NOTE: handin21
, will grab all files from your cs21/labs/00
directory. Each week, make sure you create your lab programs and files in the correct cs21/labs/XX
directory!
This semester we’ll be using Piazza, an online QandA forum for class discussion, help with labs, clarifications, and announcements that pertain to all sections of cs21. Our Piazza page is https://piazza.com/swarthmore/fall2018/cs21. You should have received an email invitation to join cs21 on Piazza - if not let us know.
For this first lab, just to get comfortable using Piazza, choose at least one part of your bio.txt
file above to post on Piazza (non-anonymously). You can include where you are from, something else you are doing at Swarthmore, your entire bio, or whatever you prefer. Add your post to this thread as a “new followup discussion”.
Each lab will have a short questionnaire at the end. Please edit the QUESTIONS-00.txt
file in your cs21/labs/00
directory and answer the questions in that file.
Once you’re done with that, run handin21
again.
If you are done early, you are welcome (but not required) to create your own webpage (now or at any time during the semester). To get started, follow these instructions. There are many tutorials on how to make a webpage - the Khan Academy tutorial is very comprehensive.
When you are all done working in the lab, you should log out of the computer you are using. First quit any applications you are running, like the browser and the Terminal. Then click on the logout icon and choose “log out”.
If you plan to leave the lab for just a few minutes, and then come right back to work, you do not need to log out. It is, however, a good idea to lock your machine while you are gone. You can lock your screen by clicking on the lock icon.
As part of your Lab 0 grade, each student must visit the office of their lecture professor. If you can come during our official office hours, that is ideal, but you are also welcome to stop by any time we are around. You do not have to have a specific question, you can just drop by to introduce yourself and learn where our offices are. We will have sign in sheets to check you off.
Don’t forget to run handin21
to turn in your lab files! You may run handin21
as many times as you want. Each time it will turn in any new work. We recommend running handin21
after you complete each program or after you complete significant work on any one program.