A. Obtaining an Instructional Account
Request an EECS instructional account here.
You should receive a login that looks like
*** represents 2
or 3 letters, as well as a password. Memorize your login and hold on to your
password for just a bit (you can change it below).
You should now be able to use the lab computers using your login and password.
B. Accessing Remotely
You may wish to access your instructional account remotely from a personal or non-lab computer (checking grades, for example). If you are using a lab computer for today, you can come back to this section later.
Use your Terminal (or Git Bash if you're using Windows) to access your class
account remotely through the
*** with the letters from your login.
You may come across a message along the lines of
The authenticity of host 'cory.eecs.berkeley.edu (126.96.36.199)' can't be established.
You may always ignore this message and type
yes to proceed.
C. Registering & Updating Password
This section is done on the instructional account. If you are working on a lab computer, just login. If you are working from a personal computer, then ssh in as described in Accessing Remotely first.
Register for the course by typing this command into the terminal:
If nothing is outputted, that means you are already registered for the course and you can move on to the next step.
You can also change your password using:
D. UNIX Commands
The lab computers run on the UNIX operating system. As such, you can use terminal commands to make changes to your directory and files. You will find that you can use most of these commands on your local computer as well. Familiarizing yourself with these commands are an important part of being a programmer; although we will not test you on this, these commands will make your life easier as you code. Below are some important ones that you may find useful in this course:
cd: change your working directory
This command will change your directory to
pwd: present working directory
This command will tell you the full path for the current directory you are in if you are not sure where you are.
.: means your current directory
This command will change your directory to the current directory (aka. do nothing).
..: means one parent directory above your current directory
This command will change your directory to its parent. If you are in
/workspace/day1/, the command will place you in
ls: list files/folders in directory
This command will list all the files and folders in your current directory.
This command will list all the files and folders in your current directory with timestamps and file permissions. This can help you double-check if your file updated correctly or change the read-write- execute permissions for your files.
mkdir: make a directory
This command will make a directory within the current directory called
rm: remove a file
This command will remove
file1from the current directory. It will not work if
file1does not exist.
rm -r dir1
This command will remove the
dir1directory recursively. In other words, it will delete all the files and directories in
dir1in addition to
dir1itself. Be careful with this command!
cp: copy a file
cp lab1/original lab2/duplicate
This command will copy the
originalfile in the
lab1directory and create a
duplicatecopy in the
mv: move or rename a file
mv lab1/original lab2/original
This command moves
mvdoes not leave original in the
mv lab1/original lab1/newname
This command does not move the file but rather renames it from
There are some other useful tricks when navigating on command line:
- UNIX can complete file names and directory names for you with tab
completion. When you have an incomplete name (for something that already
exists), try pressing the
tabkey for autocomplete or a list of possible names.
- If you want to retype the same instruction used recently, press the
upkey on your keyboard until you see the correct instruction. This saves typing time if you are doing repetitive instructions (like running Java programs on command line while testing).