Unix Basics

This lab is intended for you to work on your own to practice the Unix commands from class.

Follow these directions:

  1. You should be logged in, have a terminal session open and the web browser with these instructions
  2. Issue the command to check what directory you are in
  3. If you are not in your home directory, move to it
  4. Create a directory named test and move to that directory
  5. Using the editor, create a file named sept.txt
  6. Copy sept.txt to testing
  7. Rename testing to today
  8. Copy today to your home directory and call it wonderbar
  9. change to your home directory
  10. Copy wonderbar to test and call it fabulous
  11. Copy wonderbar to test and call it magnificent
  12. Change to the test directory
  13. List the files
  14. List all the files including hidden files
  15. List all the files including hidden files with detailed information
  16. Type in garbage "hhhh" and before hitting enter, hold down the Ctrl key and hit the u key. The command should have been erased
  17. Issue the command "whereis ls". What does it tell you?
  18. Issue the command "which ls". What does it tell you?
  19. What is the difference between the w and the who commands
  20. display the value for the PATH environment variable
  21. remove the test directory and all the files
  22. change to your root directory
  23. Issue the command to list all files with additional information. Look at the first 10 characters. The first - is used to indicate if the item listed is a directory. The next 9 characters are permissions. They are in three sets of three. Each set indicates if there is read, write, and execute permissions on the file. So rwx would indicated all three permissions. But, r-- would indicated only read, rw- would indicated read and write.
    The first set of three are the permissions for you the user. The second set of three apply to the group (currently only you). BUT the last set of three apply to anyone who has access to the machine - which we refer to as "other".
  24. From your home directory, carefully issue the following commands. After each command, check the long listing to determine what permissions changed.
    chmod go-rwx cs207
    mkdir public_html
    chmod go+rx public_html
    chmod go+x .

Running log for this lab