First, please make sure you have an active account with SEASnet (see Boelter 2664 if you do not have a login and/or apply here: ).
Then, you will be able to connect to their servers using a simple SSH command:
ssh yourusername@cs33.seas.ucla.edu
While cs33.seas.ucla.edu is a machine dedicated for us, in case it becomes overloaded and slow due to too many people accessing it at once, you should also be able to connect to more available machines without issue with the command:
ssh yourusername@lnxsrv.seas.ucla.edu
Important note: if not connected to a UCLA network, you must use the Campus VPN service if trying to login into these machines. Read more here.
If you are on Windows, you can use putty to connect instead of using the command line.
<—
First run this command on your cs33 machine:
echo 'export PATH=/usr/bin:$PATH' >> ~/.profile
Then log out of the machine and then log back in again. Now check if you are using the right version. Run this command:
which gdb
If it shows “/usr/bin/gdb” then it is correct.
And run this command:
which gcc
If it shows “/usr/bin/gcc” then it is correct.
—>
There are different methods depending on what you’re most comfortable with, but here are three strategies:
wget
if its a link on the internet), then edit locally using a command-line editor.For example, vscode remote-ssh repeatedly asks for password and dosen’t log in. At least one thing to try:
ps aux | grep YOUR_USER_NAME_HERE | grep vscode
If you see output, make a note of the numbers in the second column (those are PIDs) and then
run: kill -9 PID1 PID2 … PIDN replacing PID1,etc with the numbers you see.Download Cyberduck (LINK: https://cyberduck.io/download/).
When you open the app, go to ‘Open Connection’ in the top left corner of the window.
Once this opens, click the pulldown menu and select SFTP.
Fill the server and your username with, for example, cs33.seas.ucla.edu and “bob”
For the password, enter your password that you use to get on the linux server.
Click Connect in the bottom right corner. Once you connect, you will see what you typically see when you type ls on linux server, which shows all of your folder and files.
Double click a file to download to your Downloads folder.
chmod
, a linux command, is your friend. You can enable read (r) write (w) and/or execute (x) permissions on a file (filename) by executing the following command:
chmod +rwx filename
You can learn lots more about this command here.
There are many resources online that teaches about Linux terminal command, a few recommended listede below:
Terminal Tutorial : A comprehensive tutorial about terminal command. Some sections of the tutorial is not needed for this course, but still good to learn. Recommended section 1-5 and 8-12.
Cheat Sheet : Cheat Sheet of terminal commands & examples relevant to this course. A good alternative if you don’t want to spend too much time on the tutorial (Made by TA of this course)
Dont’ worry if there is seems to be too many Linux terminal commands, nobody knows them all or even come close to that. Plus you’ll learn a lot more about terminal in CS35L.
Don’t worry, GDB is not so bad. It is just a normal debugger with a text-based interface. There are many good tutorials online that you could use. Google is your friend here, but here are a few that are pretty good.
Basically, GDB gets confused when you run within TUI mode. To get around this, just switch out of TUI mode before you run the program. I normally follow this pattern when debugging assembly.
switch to tui mode (c-x ,c-a)
if debugging assembly, switch to asm layout
single step (ni or si commands, etc.), and look at registers (p $rdx), set break points (b label)
switch back to normal mode (c-x ,c-a)
run until next breakpoint (run)
switch back to tui mode (back to step 1)
You could memorize the x86 manual. But yes, there’s an app for that.
An even better online disassembler is here. Just make sure to switch it into x86-64 mode, and also switch to att syntax.
During many weekday hours from 10:00 to 5:00 through week 9, free CS 33
tutoring is available by
UPE
TBP, and
HKN.