Hello, and welcome to CS2043 - Unix Tools and Systems!
The primary learning objective of this class is comfort and familiarity. We want to empower you to feel as
comfortable and confident in the bash shell as you would in a generic office program; maybe you don’t know
how to do everything at first, but you have the tools you need to figure the basics out, and the confidence
that the more advanced features will be easy enough to discover in time. In service to this learning
objective, the entire course will be conducted in a terminal-only Linux environment hosted in the
department, on wash.cs.cornell.edu. You’ll get an account on this
before the first lecture, and will use it
to access, complete, and hand in all of your assignments. We will have a piazza for general questions, but
otherwise everything’s on wash.
Structure of the Course
The lectures in this course will be a mixture of traditional slide-based presentation and interactive
hands-on labs. Students are encouraged to bring laptops or tablets with them to every class, but must
restrict their use of these devices to only the interactive sessions. Students needing laptops outside of
these interactive sessions may continue to use them, but must strive to avoid any activities — like
checking facebook or email — that could prove distracting to the students around them. You have phones
for that, if you truly feel you must :)
Assignments and Grading
Assignments will be completed and handed in on the course server,
wash.cs.cornell.edu. It is perfectly
permissible to complete assignments on your own hardware and then transfer them to wash for handing in,
though it may not always be possible or convenient to do so. Assignments will be due at the start of class
unless otherwise noted. Assignments will strive to be small and easy to complete, again unless otherwise
noted. Assignments will be due frequently; the first assignment, for example, will be due on Monday
This class will feature a small quiz component in the form of a “command of the day”. Each class period will be associated with a command of the day; students are required to write out a short description (1-2 sentences) of what this command does using the command we provide, and turn it in at the front of the class. You can make up missed quizzes any time; just take extra index cards at the start of a later class period.
Grading will be largely automated, and based around a check, check-plus, and check-minus system. It is possible to receive a grade of “autograder error”; we will investigate these grades at your request, and will automatically investigate all of these grades if it would effect your grade at the end of the semester. We will err on the generous side of grading; this is a mandatory pass-fail class, and students whose assignments average out to “check” will definitely pass it.
In CS2043, we strive to foster an engaging and collaborative environment. But this is made difficult by the nature of our subject matter; what is a struggle to understand for one student might be an imperceptible leap of intuition for another. For this reason, we kindly ask students to refrain from discussing assignments with each other, especially at the beginning of the semester. If you have been trained as a TA, or are otherwise experienced in how to help someone without revealing critical information to them, then you may ignore this restriction; but please be careful! This class is designed to help transform students who find themselves (more often than not) blindly following the advice on stackOverflow into students who feel comfortable with every line they type into a terminal. An over-reliance on outside help will hinder this most important lesson.
When assignments are released, unless otherwise noted, we expect the entirety of the assignment to be the work of a single student. For non-programming assignments, this means you should complete them in isolation. For programming-based assignments, the advice in the first paragraph still holds; if you decide to collaborate (perhaps you are a TA, or otherwise good at helping without providing the answer) you are restricted to “whiteboard-only” collaboration. You may discuss your ideas with your classmates at a whiteboard, but cannot take away any notes from this discussion. Students must be able to independently reconstruct everything they did in collaboration.
If you are at all concerned about whether a certain behavior is allowed under this policy, please ask on Piazza. One of our helpful members of the course staff will be sure to answer promptly!
This policy may be updated during the semester; we will announce any changes via e-mail or piazza.
Schedule of the Semester
This is a tenuous plan for the semester, subject to change without notice. Please also refer to the
schedule posted on the course website; the course schedule on the website is the authority.
Class #1: course plan overview and account creation/validation. Create accounts for the students and ensure they all work!
Class #2: basic SSH (no frills or options beyond username/hostname), with a mini-lab testing logging in. The UNIX filesystem: its structure and the navigation thereof.
Class #3: permissions, what they are, and what they mean. More detail on what “commands” really are in the shell. The “find” command, among others, are covered in this lecture time permitting.
(assignment “harry potter and the chamber of d———” released)
Class #4: redirection and piping commands. introduction of the “swiss army knife” of pipestream commands (grep, cut, head, tail, etc)
Class #5: editing, editors, and local git. Mostly a lab class. Bonus: introducing mosh.
Class #6: wildcards in bash,
Class #7: the
& operator and local jobs management. Intro to
Intro to hardlinks. A lot more on symlinks, hardlinks,
stat and the restrictions of linking in the
Class #8: remote Git, and working with your local bash environment. Mostly a lab-class.
Class #9: more bash scripting (
function) and overflow from class #7+8.
Class #10: tmux, screen, rsync, scp, and everything else you need to work remotely.
The rest of the semester will be populated by a selection of the following modules, based on course interest.
#1: ifconfig and ip; networking itself
#2: ping, traceroute, dig, curl, wget, more on networking itself
#3 (lab): netcat, telnet, iptables: actually connecting to people
#1 (lab): intro to ec2, and the cloud in general
#2: docker and the containerized world
#3: cloud functions and other cloud-only concepts
Section: language-specific package management.
(prereqs: scripting in python, node, ruby, haskell, or ocaml)
#1 (lab): local command environments
#2 (lab): package management writ small
#3: what to do when it gets all screwed up, — or — working with research code
Section: more on scripting!
#1: bash beyond — arrays, dictionaries, other features
#2: beyond bash — (g)awk tricks
#3: beyond bash — python, and the os module
Section: what’s going wrong?
#1: resource usage tools: df, htop, top, free, etc.
#2: limits, security, and resources you don’t think about (i.e. inodes)
#extra: log files; where they are, how to get them, how to read them.
#4: linking errors, broken dependencies, and unhappy libraries. strace, dtrace.