Updated Mon Jan 30 14:11:23 EST 2023

Studio 0: Get your computer set up for commandline exercises

This exercise is to help you get your computer set up for commandline use before our first meeting on February 1. If you can do this before class, everyone's life will be simpler. It shouldn't take you more than 20-30 minutes, depending on your computer and your previous experience.

If you have a Mac, things will be simple (he said optimistically).

run the Terminal app, which you can find under
   Applications / Utilities
if you like
   use Preferences to set fonts and colors
   drag Terminal to the dock for easier access later
The default Mac Terminal window looks something like this:

If you have a Windows 11 laptop, you will have to install a package called WSL (Windows Subsystem for Linux), which will give you access to all the standard commandline tools that already exist on Macs. The official Microsoft instructions are here, but if everything goes smoothly, this is it:

Start PowerShell
   Start / All apps
This should open a window similar to the one below.
   wsl --install
and push Enter or Return

This should start a longish process of downloading, at the end
of which a new Terminal-like window opens.
At this point, you should be at the same stage as macOS users.


Now, for everyone:

Type date and push Enter or Return. Don't type the dollar sign!

$ date
		you should see the current date and time
Now type
$ echo hello there
		it should reply hello there
Finally, type
$ pwd
		prints the name of the folder that you are currently in

If you get this far, you're in good shape, and you can start to play with the material in Studio 1.

If you have any trouble, get in touch with Brian Kernighan (bwk@cs.princeton.edu) or talk to any COS major.