CS228 Lab 1: Running Commands
Due Tuesday, January 26, by 10:30 AM
For lab 1, you must log into isoptera (if you don't have an account on isoptera, let me know and I will make you one). Once on isoptera, create a text file named "lab1" in your home directory, and enter the answers to the following questions into the file. You may want to open up a second shell on isoptera so you can find the answers while your text file is open. To do this, launch putty again if you're using Windows, or open another terminal if you're using OSX or Linux.
Create the text file like this (feel free to use a different text editor if you like):
Once nano is running, look at the lowest two lines on the screen to see how to operate it. The caret (^) means control, the key below shift on most keyboards. Hold down control and press the indicated letter. "write" is the same as "save". The filename will be the one you specified when you opened nano (lab1).
Here are the questions for lab 1:
After the file is created, protect it so that other students can't read your answers. Do this by running the following command:
- What is a Linux distribution? Why would you need to install a distribution instead of only the Linux kernel?
- How long has isoptera been running since it was last rebooted? Use the "uptime" command to find this.
- How many shells am I running on isoptera? Run "who", and count the entries for user seth.
- What happens if you run the command "ssh isoptera" on isoptera? (hint: Notice what happens if you exit the sesson after doing this)
- I have hidden a secret in the directory /tmp, in a file called "secret". What is the secret? You can use the "cat" command to print out the file, or open it in a text editor (nano, etc).
chmod 600 lab1
"600" refers to the permissions granted. 6 is read and write. 0 is no permission at all. The 6 is for you, the 0 in the end is for other users in your group, and the last 0 is for everyone else. I will use the administrator account to grade your lab. Permissions will be covered in detail later in the class.
This assignment is worth 35 points, 5 from correct naming, 5 from correct permissions, and 5 from each of the questions above. Note on naming: I will be grading these via a script which will look for the exact name, so your lab must be in the correct location with the correct name. This includes case (upper vs. lower).