Updated Mon Feb 6 13:14:26 EST 2023

Some observations on Studio 1

Here's a list of random observations as I watched people work through the first in-class studio exercise, and some suggestions about how to make things easier or smoother.

Case matters. File systems usually care about the difference between upper and lower case. Historically, Unix users have preferred lower case for most things.

Spaces matter in lots of places. The most obvious is between the name of a command ('ls'), and its options, like '-lt'.

Make sure you're in the right directory. If you move up and down the hierarchy you can lose track of where you are. Use pwd to find out, and cd to return home.

In the examples of copying and renaming files, "f1" and "f2" were meant as arbitrary filenames, to be replaced by your own names.

You can copy commands from the web pages with copy and paste. This usually works fine and is less error-prone than trying to re-type a long commandline. The long curl command is a fine example.

The cryptic command names have a rationale or at least a historical reason; we'll talk about it. It is not a plot to frustrate students.

You can (and probably should make terminal windows bigger; if nothing else, they're hard to read when someone is looking over your shoulder trying to help. You can also change fonts, colors, default size, and lots of other things. On a Mac, Terminal / Preferences is the place.

Edit: On Windows 11, control-shift-P brings up a Settings menu. Scroll down to "Select color scheme...". I found "Ubunto-ColorScheme" to be the best of a bad lot. You can also set text size and other things from this menu. Not everything seems to stick.

You can change the prompt string, which by default is often exceedingly long and basically useless. The simplest thing is to say

PS1='$ '
to set it to a dollar sign and a space. (The quotes are necessary.) Do this once at the beginning of a session; see me for a way to make it stick so you never have to do it again.

You can have multiple terminal windows! This is often very useful when you are poking around trying to count things and make a record of what you're doing. Use one window for counting, another for recording.

Pushing tab will complete what you have typed so far with the name of a file, if that's unique where you are; pushing tab twice will bring up a list of alternatives that all start with the same sequence of letters. This didn't work for some people. I have no idea why but would be happy to try to help.

I am not a Windows user. If anyone learned something about Windows that ought to be here, please say so.

Some people discovered that zip was not available, and were offered a command that would install it. This might have required using the sudo command. "su" is the super-user, to whom normal rules about file permissions do not apply, and "sudo" says to run a command as the super-user. It will want a password, which is likely to be the password you use to log in to your computer, or that goes with your PU netid.