- The activity Shell introduction quiz is complete and passed
- The activity Text manipulation quiz is complete and passed
Section outline
-
שימו לב: זהו הקורס של שנת תשפ"ד (2023-2024). לקורס של תשפ"ה (2024-2025) יש ללחוץ כאן.
Welcome to System Introduction for Computer Science (67100)!
For many years, students have requested a course on using Unix-like operating systems. In this course we will learn precisely that!
The tools we'll use are relevant not only for "Intro2CS" and other courses, but also for real-world programming.
This is a self-work course which is intended to be studied independently, at your own pace.
Please refer to the "Guidelines" section for additional details.Practicing the material
If you want to practice the material taught in the videos or want to access the command-line shell from your personal computer, you don't have to use the aquarium's computers!
1. You can connect remotely to the university's computers by following unit 8 ("connecting to remote computers").
2. If you want offline access to Linux, you can install it on a virtual machine by following the appropriate videos in unit 9 ("the virtuals").
Deadlines
You can start the course as early as you like, as long as you finish it before the deadline.
The deadline for finishing the course is the last day of the semester which you have picked for "System Introduction for CS" (67100) on rishum-net, at 23:59.
Summer semester and semester aleph students: your deadline will be on May 5thMarch 17th, 2024.
Semester bet students: your deadline will be on September 1st, 2024.
Your final grade is not updated immediately after finishing the course, it will appear in the "מידע אישי" approximately two weeks after the deadline, according to the semester you registered for.
-












Section X

Material
We will follow the course book and the Wikipedia page of the Computer Science school at the Hebrew University.
Both resources are in English, so if you're not proficient in Hebrew, or would rather study from a textbook, you can use them.
Additionally, MIT has created a similar course (after us!), which is available here.
If you find the pace of the videos too slow, you can always use YouTube's X2 feature, or simply read each video's description, as all important information is detailed there.
Units
The course is divided into units, each focusing on a specific concept.
The time needed to complete each unit (including quizzes) is written next to the unit's title.
Although units are numbered, their order doesn't matter - after you've finished units 2 and 3, you can tackle all other units in whichever order you want.
In addition to the videos, some units contain optional reading material to help you further explore the topics taught.
Quizzes
Every few videos you will have to answer a short quiz.
The quizzes are designed to help you learn and to motivate you to use the command-line shell yourselves!
Passing the course
If you want to pass the course, you will have to pass all
quizzes.
Due to the war: some quizzes are now optional, and you do not need to pass them to pass the course (optional quizzes have "Optional:" in their name).
The passing grade for each quiz
is half of the full one.
For example, if the full grade of some quiz is
4, getting 2 is enough to pass.
If you didn't pass one of the quizzes, a feedback page with a list of your mistakes will be shown.
You can redo every quiz as much as you like, so don't be afraid of them!
To make sure you haven't missed any quiz, please use this progress-bar and your grade report.
The final grade for the course is binary, so grades have no meaning as long as you pass.
If something does not work or you need help
This is a self-work course which is intended to be studied independently, at your own pace.
You will face many difficulties throughout your studies, and even more when you finish your degree and start working, so you have to be able to face such difficulties independently:
- First of all, try going over all relevant course material; it probably has the answers you're looking for.
- If this doesn't help, try searching for the answer using your favorite search engine.
- If things still don't work:
- If some important service (OTP registrar/the university's git/etc') is down, please contact system (system@cs.huji.ac.il).
- If you need help with the material, please contact your Intro2CS TAs (מתרגלים) and lab support, or any other programming course you are currently taking.
Let's start!
Now that we're done going over the bureaucracies, we can start having some fun.
Our next step is Unit 1!

Relevant links:
A playlist of all course videos
------------------
-
Introducing this course (and Aviv!).
Optional reading material:
Course book
HUJI CS wiki
Meet Aviv! -
A brief explanation on why the CSE working environment looks so differently than what you (might) have at home.
-
-
Meme for finishing this unit Page
Once you finish this unit, you'll be able to open this page and see a meme!
Not available unless: The activity First quiz! is complete and passed

Unit playlist
------------------
-
In this video we will learn about executing programs like 'echo' to print strings on the screen, 'cat' to print files, and 'man' to read manuals.
We will also use '&' to run multiple programs at the same time, and use 'Ctrl+c' to quit the currently running program.
Update: when the video was recorded, the university used the "tcsh" shell, but now we are using the "zsh" shell.
This will only make a difference when we get to unit 5.
Optional reading material:
What the command-line shell is, and command structure -
Let's get some important things down before we proceed.
Optional reading material:
A cheatsheet that contains useful shell commands and tricks -
In this video we'll see tricks that help use the shell efficiently like:
- Using the 'tab' button to automatically complete commands.
- Using wildcards like '*' and '?', and multiple option expansions using '{option1, option2, ...}'.
- Using 'history', '!', '!!', and '!$' to reference previous commands and parameters.You may ask - why bother with such "tricks" when we still haven't seen the basics?
Well, these techniques are precisely the reason we want to use the command-line shell!
These tricks help us perform complex operations very quickly. -
We'll learn basic text editing and file manipulation using 'cat', 'touch', 'echo', 'diff', 'Emacs' and 'Vim'.
Optional reading material:
Vim cheat-sheet
Emacs tutorial -
In this nice quiz we'll see some more cool examples of using wildcards, and even learn a few new tricks!
-
Meme for finishing this unit Page
Once you finish this unit, you'll be able to open this page and see a meme!
Not available unless: The activity Shell introduction quiz is complete and passed ...Not available unless:- The activity Shell introduction quiz is complete and passed
- The activity Text manipulation quiz is complete and passed

You may have not known, but each time you use files and folders on a computer, you are interacting with something called a "filesystem".
It is a system that helps us manage our files, for example - create, move, rename or delete them.
These actions can be performed using the command-line shell, as we're going to see in this unit.
Relevant links:
Unit playlist
------------------
-
We will learn about absolute and relative paths, how to use 'tree', 'ls', 'cd', 'pwd', 'readlink'.
-
We will learn how to make changes to the files system using 'touch', 'mv', 'cp', 'rm', 'mkdir', 'rmdir'.
-
Just making sure you know the basics of navigating and making changes to the filesystem.
-
In this quiz we'll also learn about links, how to find files and how to search for text in files.
Optional reading material:
Soft and hard links
find tutorial
grep tutorial
Looking For Things / Searching For Things -
Meme for finishing this unit Page
Once you finish this unit, you'll be able to open this page and see a meme!
Not available unless: The activity Basic filesystem quiz is complete and passed

Unix-based operating systems offer a notion of file and folder "ownership" that allows you to control who can access your files and folders, and in which ways.
This is especially important when using a filesystem that is shared between multiple users, such as in our very own aquarium environment.
Relevant links:
Unit playlist
------------------
-
We will learn about Linux users, superusers and groups and how to use 'su', 'adduser', 'passwd', and 'group'.
Note: 'group' is not a standard Linux command, and probably will not work on local Linux installations. -
We will learn about file ownership and how to transfer it using 'chown' and 'chgrp'.
-
We will learn about read, write and execute permissions for files and folders.
-
-
We will learn how to change permissions using 'chmod'.
Optional reading material:
Permissions cheatsheet -
-
Permissions are a very important concept! Here is a very fun quiz on the subject.
-
Meme for finishing this unit Page
Once you finish this unit, you'll be able to open this page and see a meme!
Not available unless: The activity Users, ownership and permissions quiz is complete and passed

Pipelining and input/output redirection are very useful, especially for writing automatics tests for homework assignments in courses such as Intro2CS.
We're going to learn about these techniques here!
Relevant links:
Unit playlist
------------------
-
We will learn how to use pipelining to "stream" the output of one command to be the input of another command, and various command-line tools like 'uniq', 'sort', 'head', 'tail' and 'wc'.
-
Input redirection allows us to pass keyboard input to commands that usually take command-line arguments as inputs, and to to input arguments to commands that usually take keyboard input. We will learn how to redirect input using '<', '<<'.
-
Output redirection enables us to divert output intended for the screen to a file. We will learn how to redirect output using '>', '>>'.
Note: if you have the "zsh" shell (this is the shell used by the university's computers), you may not have some of the error messages shown.
If you really want to see these error messages, you can enable them by using the command "setopt noclobber". -
A short quiz on the basics of pipelining and input/output redirection.
-
We will learn about 'standard' and 'error' outputs and how to redirect them using '>', '>>', '>&', '>>&', '/dev/null', '/dev/tty'.
-
Your dreams have finally come true, we can now construct super-powerful commands using all the techniques learnt so far - pipelining, and input/output redirection.
-
Let's see how deeply you've dived into the magnificent ocean that is pipelining and redirection. Hope you brought your snorkel!
-
Meme for finishing this unit Page
Once you finish this unit, you'll be able to open this page and see a meme!
Not available unless: The activity Basic pipelining and redirection quiz is complete and passed

While using a computer you'd typically want to run and use multiple applications at the same time.
This is possible when using the command-line, as we'll see in this unit.
-
We will learn what background and foreground processes are and how to control them, for example:
- Starting background processes using '&'
- Moving foreground processes to the background and suspending them using 'Ctrl+z'
- How to resume background processes using 'bg'
- How to kill foreground processes using 'Ctrl+c'
- How to view and kill processes using 'ps', 'kill', 'fg', 'jobs' -
-
Meme for finishing this unit Page
Once you finish this unit, you'll be able to open this page and see a meme!
Not available unless: The activity Processes quiz is complete and passed

The university's Linux environment offers some powerful tools, and in this unit we're going to learn to use them.
Relevant links:
Unit playlist
------------------
-
In this video we will learn how to open a HUJI CSE account, and how to change your password.
Mandatory reading material:
HUJI CS Registrar
Rules and regulations for HUJI CSE accounts
General info on HUJI CSE passwords -
In this video, we will learn about One Time Passwords (OTPs) and how to generate them.
Optional reading material:
How to use Google Authenticator for HUJI CSE OTPs
General information about Google Authenticator
General information about authentication applications -
-
We will learn how to manage your own personal space using nquota and cleanup.
Note: the @safe folder doesn't exist anymore.Optional reading material:
Disk space management -
We will learn how to restore files and folders using the snapshot tool.
Optional reading material:
Tutorial for the snapshot tool
-
The command-line shell is not the only thing that we care about - it's also important to be good people.To this end, we will go over some disciplinary rules that are related to sexual harassment and academic integrity.
To successfully finish this unit (and the course), you must watch the following mandatory videos:
-
Just checking to see if you've got the HUJI CSE specifics down. I'm sure you do.
To open this quiz, you must watch the "Academic integrity (mandatory video)" and "Sexual harassment (mandatory video)" videos. -
Meme for finishing this unit Page
Once you finish this unit, you'll be able to open this page and see a meme!
Not available unless: The activity HUJI CSE quiz is complete and passed

Sometimes, you'd want to work from your personal computer, but still have access to the university's Linux environment.
For example, most programming courses require your homework assignments to work correctly on the university's computers.
Or, you might want to make changes to files you've stored on your university account.
In this unit we'll see how to do all these and more.
Relevant links:
Unit playlist
------------------
-
In this video we'll see how to use SSH to connect remotely to your CSE account.
To connect remotely, follow these steps:
Getting ready
- Because we use a variety of tools and operating systems, these instructions may change.
If something doesn't work, check HUJI's CS Wiki and follow the instructions there.
- You need a HUJI CSE account to connect remotely, so open an account.
- If you use Windows, you will need to install OpenSSH. Note that graphical applications will not work.
- If you use MacOS, in order to open graphical applications you will need to install Xquartz.
Connecting
- Open the commandline and write: ssh -CXJ |username|@bava.cs.huji.ac.il |username|@river
Where |username| is your HUJI CSE username.
- You will be required to use two passwords:
1. First, you will be asked to use a new One Time Password, so generate a new one.
2. Second, you will need to use your regular HUJI CSE password.
You will not be able to see the password when you enter it; this is done to maintain your privacy. -
In this video we'll see how to handle common errors when connecting to remote computers. In this video we'll see how to handle some common errors that you might face when trying to connect to HUJI CSE's computers.
- For errors like "The authenticity of host '...' can't be established. ... Are you sure you want to continue connecting (yes/no)?", simply answer "yes".
- For errors like
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
...
Add correct host key in |some-path|/known_hosts to get rid of this message."
Simply delete the file "|some-path|/known_hosts", for example by running: "rm |some-path|/known_hosts" -
We will see how to transfer files between the university's computers and our personal computer using FTP (possible with all operating systems).
If the method presented in the video does not work, you can use the following command:
"sftp -o ProxyJump=|username|@bava.cs.huji.ac.il |username|@river"
Windows users: note that 'pwd' and '!ls' will not work for you, but instead of '!ls' you can use '!dir'.Optional reading material:
Connecting from outside using FTP - a tutorial -
This tutorial shows how to use a program called "WinSCP" to transfer files on Windows.
Make sure you follow the section written in "Using jump server".
If you cannot see the windows shown in the tutorial, you can click in the top bar on "Session" and then on "New session". -
We'll learn about the 'wget' command, which will allow us to download files from the internet.
Optional reading material:
wget tutorial -
When working from home and you're missing the aquarium, it's possible to remotely connect to the university's computers. Do you know how to do so?
-
Meme for finishing this unit Page
Once you finish this unit, you'll be able to open this page and see a meme!
Not available unless: The activity Remote connection quiz is complete and passed

In this unit, we'll see how to create different kinds of "virtual" environments that are "separate" from the rest of the computer.
This way, you can install multiple versions of the same python library (useful for Intro2CS), or even multiple different operating systems (useful if you want to use Linux and Windows at the same time)!
Relevant links:
Unit playlist
------------------
-
We will learn about pip, a tool for managing python packages, and see how to install and uninstall them using 'pip install' and 'pip uninstall'.
Optional reading material:
pip tutorial -
We will learn how to use virtualenv to create isolated Python environments, and how to use them with pip.
Note: if "source |path|/bin/activate.csh" does not work for you, you should probably use "source |path|/bin/activate".
Optional reading material:
virtualenv tutorial -
We will learn how to install Linux on your own operating system, without worrying about messing things up in your "actual" operating system.Optional reading material:
-
We will learn how to install applications on Ubuntu using the applications store and apt-get.
Optional reading material:
Install additional applications
How to use apt-get -
-
Meme for finishing this unit Page
Once you finish this unit, you'll be able to open this page and see a meme!
Not available unless: The activity Virtual quiz is complete and passed

Git is a powerful tool for programmers - it allows you to keep track of changes made to your code, compare and revert them.
It is recommended to use Git when working on programming homework assignments, for example in Intro2CS.
Luckily for you, the next few videos teach the basics of using Git!
Note that you can use git on Windows and Mac too, if you follow these instructions.
The command-line usage is exactly the same as shown in the videos.
Optional reading material:
Unit playlist
Git tutorial
Better Git It In Your Soul
------------------
-
-
In this video we will see how to set up the user info (using 'git config'), initialize a repository (using 'git init'), check the repo's status (using 'git status'), add files (using 'git add'), commit (using 'git commit'), and view the commit tree (using 'git log').
-
In this video we'll learn how to track changes to files, including changing file contents (using 'git add' and 'git commit'), moving/renaming files (using 'git mv'), deleting files (using 'git rm'), and viewing the difference between changes (using 'git diff').
-
In this video we'll learn how to revert committed changes (using 'git revert'), unstage staged changes (using 'git reset'), and undo changes that weren't even staged (using 'git checkout').
-
Gitting started - let's see if you've got the basics down!
Optional reading material:
Git cheatsheet -
In this video we'll learn about branches - how to create them (using 'git branch'), how to merge them (using 'git merge'), and how to solve conflicts.
Optional reading material:
Learning git branching -
In this video we'll learn what are remote repositories (in short - they'll allow us to work together with others on a single project). We'll also see how to fetch, pull and push to remote repos (using, how surprisingly, 'git fetch', 'git pull', and 'git push'), and how to open remote repos in github.
Relevant links:
HUJI's very own github (login using your CS username and password) -
There are many GUIs for git, this is a brief example of using git with PyCharm, showing how to use git when working on an actual project, including adding, committing, pushing, pulling and merging.You can use PyCharm on Windows and Mac too, including all of the git functionality.Optional reading material:
-
-
Meme for finishing this unit Page
Once you finish this unit, you'll be able to open this page and see a meme!
Not available unless: The activity Gitting started quiz is complete and passed

Once you finish the course you'll be able to click this link and get
your course-completion diploma, so you will have something to hang on
your fridge!
Remember: learning is a life-long process; Linux is sophisticated and has a lot more going on then what we've seen so far, I encourage you to learn more on your own.
Good luck with your studies!
-
We've only covered the very basics of using the commandline shell.
The shell should be an extension of your mind - it should be tailored exactly to your measures, so that using it saves you time instead of creating more problems.
For example, this is how my shell looks like. To paraphrase the Rifleman's Creed:
This is my terminal. There are many like it, but this one is mine.
My terminal is my best friend. It is my life. I must master it as I must master my life.
Without me, my terminal is useless. Without my terminal, I am useless.