PRACTICE: Homework 0 - Shell Access

Due: Monday, April 3, at 11:59pm

This assignment lays the foundation for the rest of the course. In it you will demonstrate that you can log into the course Linux system and execute basic shell commands. Students will submit their work via Gradescope, which will automatically check the submission. Students are encouraged to resubmit until they earn all 10 available points for HW 0.

Requirement Specifications

For this assignment you must use your account on seaside.cs.washington.edu. It is possible to use another reasonably recent Linux system for many things, but we will use the CSE systems to evaluate submitted work, and you need to verify that everything you submit works correctly there. See the Linux Resources page on the course web site for more information about how to get started.

  1. (Shell) You must be sure that your default shell is bash. Otherwise you will run into strange, baffling problems with shell scripts. Enter the command echo $SHELL. The response should be /bin/bash. If the shell name is different (csh, tcsh, or something else), use the appropriate commands on your system to change your login shell to bash. On many Linux and Unix systems this can be done with the command chsh or ypchsh.
  2. (Commands) In your shell window enter the following commands. They should work without errors if typed exactly as shown. (Note: You will start your session in your home directory. You will want to make a directory in your udrive to hold CSE374 work. You may do this by typing the following commands:
        cd ~/udrive
        mkdir cse374
        cd cse374 

    The script command will capture the terminal session and save it in a file named hw0.script in the current directory.

     
       script hw0.script
       echo $SHELL
       whoami
       pwd
       uname -a
       gcc --version -std=c11
       exit

Assessment

This assignment is worth 10 points - 2 points for each command between echo and gcc --version -std-c11. As this is a foundational assignment you are encouraged to resubmit until you earn a perfect score. Hint: The scriptcommand records everything, even backspaces. If you have too many corrections there will be a lot of extraneous characters if your hw0.script file that may interfere with the autograder. In this case, repeat the exercise carefully avoiding extra key strokes. If you would like to see what is in your script file, use the command cat -A hw0.script.

Turning In

Please submit to the Gradescope HW0 assignment. This is linked through Canvas, or you can go directly through Gradescope. You should submit one file, called hw0.script. Gradescope allows for file uploads through your web-browser window, but you will likely need to copy hw0.script from your remote machine to your local one to use that process - look for directions using scp.