This repository contains files for configuring your CS50 development environment on the Thayer Computing systems. Specifically, it contains the following:
README.md
- a file with these instructions, in 'Markdown' format.dotfiles
- a directory with 'dot' files for your home directory; see dotfiles/README.md.shared
- a symbolic link to a shared directory of CS50 content provided by the instructor.
You cannot connect to Thayer's Linux servers unless you are connected to the Dartmouth campus network; if you are off campus, connect your laptop to Dartmouth's VPN.
-
Open a Terminal window:
- on MacOS, launch
Terminal
from the Utilities folder (inside the Applications folder) - on Windows, launch
Windows Command Prompt
- on MacOS, launch
-
In that Terminal window, you will see a prompt, likely ending in
$
. After that prompt, type the following command but substitute your Dartmouth NetID:ssh d12345x@plank.thayer.dartmouth.edu
(The
ssh
command means 'secure shell', which opens a secure connection to server namedplank.thayer.dartmouth.edu
and launches thebash
shell program under user idd12345x
.)If it reports "connection refused" or (after a long wait) "connection timed out", double-check that you are connected to Dartmouth's network or VPN.
If it asks you
Are you sure you want to continue connecting (yes/no/[fingerprint])?
, say yes.It will ask for your password; use your NetID password. It will pause briefly, warn you about your usage of disk space on the Thayer File System (ThayerFS), and then give you a command prompt; it will look something like this:
$ ssh d12345x@plank.thayer.dartmouth.edu d12345x@plank.thayer.dartmouth.edu's password: << You are currently using 47.39M of your 5.00G home directory quota. >> d12345x@plank:~$
In the above example,
$
is the shell prompt on your laptop; if you are tempted to copy-paste thessh
command, don't copy that prompt! -
You are now at the command line: the computer prints a prompt (
d12345x@plank:~$
) and waits for you to type a command. The prompt indicates you are userd12345x
, logged into server namedplank
, and your current working directory is~
, which is shorthand for your home directory. All of your files will live in your home directory (like a folder) or in subdirectories (like subfolders). Below, we do not show the prompt, just the commands you should type. -
At the prompt, type the command
copy_skel
to install the standard Thayer-issuebash
configuration files:copy_skel
This program installs (or overwrites) the files
.bashrc
and.profile
in your home directory. Important: if you have used Thayer's Linux systems before, and have customized your copy of these configuration files, typen
when the script asks to overwrite them; if you typey
you will lose your customizations and begin with fresh Thayer-supplied default configuration. -
Set up your GitHub account and provide GitHub a 'key' so your account on
plank
can access GitHub; follow these instructions, and then return here. -
Clone this repository into your home directory:
git clone git@github.com:cs50spring2021/cs50-dev.git
The result is a subdirectory named
cs50-dev
in which you should do all your development for this course. -
The repository contains some necessary extensions to the bash configuration files; update your bash configuration to invoke them when you next log in:
echo source ~/cs50-dev/dotfiles/bashrc.cs50 >> ~/.bashrc echo source ~/cs50-dev/dotfiles/profile.cs50 >> ~/.profile
These
echo
commands append a line to the bottom of each file. Within those files, thesource
command tells bash to read commands from the named file. -
Copy our recommended files into your home directory:
cp -i cs50-dev/dotfiles/emacs .emacs cp -i cs50-dev/dotfiles/vimrc .vimrc cp -i cs50-dev/dotfiles/gitconfig .gitconfig
Important: if you already had a Linux account on Thayer systems, and already had one or more of those dot files,
cp
will ask if you want to overwrite them; typey
if you want to use our recommended file, and typen
otherwise. You may want to compare our files to yours, and edit in our suggestions as you see fit. -
(OPTIONAL) To pick a preferred editor, edit
~/cs50-dev/dotfiles/profile.cs50
to uncomment one line definingEDITOR
. You can postpone this step until you've decided on your favorite editor.Read about editors.
-
Finally, log out of plank (use the
exit
command to exit bash), and log back in using thessh
command from above.exit
Do all your work in the c50-dev
folder.
Thus, after login, use the cd
command to change your current directory (aka working directory) to the cs50-dev
subdirectory:
d12345x@plank:~$ cd cs50-dev
d12345x@plank:cs50-dev$
Note how the prompt changed to reflect the new directory. From there, create or clone new git repositories for your coursework.
Much more information about the systems we use in CS50, including links to many other resources, can be found on the systems page of the course website.