CIS 130 Exercises

Homework: Linux Command Line

Boot the PC using the Knoppix 5.1 LiveCD distributed in class. Open a terminal window and answer the following questions. 

[NOTE: You may use information from your class notes, the Internet, your textbook or other reference books to find out about the commands needed to complete these exercises. You should write down the specific commands used on a printout of this assignment, but must word process your answers to hand in.]

  1. Who are you currently logged in as?  _________________________
  2. What is the current directory?   ______________________________
  3. Change directories to the root directory.
    What command did you use?   _______________________________
  4. Get a listing of the files in this directory
    What command did you use?   _______________________________
  5. Change to the directory where configuration files are kept.
    Get a listing of the files in this directory showing file details.
    Look for a file called services.
    What permissions does it have?   _____________________________
    Who owns it?   ____________________________________________
    What group does it belong to?  ________________________________
  6. Become root.
    What is root's home directory?   _______________________________
  7. Create an empty file called "demo" in root's home directory.
    What command did you use?  _________________________________
  8. Change the permissions on demo so that everyone can read, write, and execute it.
    What command did you use?   _________________________________
  9. Edit the file so that it contains the following lines:
                date
                whoami
                pwd
                echo $PATH
    Save and quit.
    At the command line type demo.
    What appeared on your screen?   ______________________________
    _________________________________________________________
    Why?  ___________________________________________________
    _________________________________________________________
  10. Rename the demo file to be called go130
    Get a list of files in the current directory
    What files were shown in the listing?  __________________________
  11. Copy the file go130 to the directory where temporary files are kept.
    What command did you use?   ________________________________
  12. Change to the directory where temporary files are kept.
    Get a listing of all of the files in the current directory
    Besides the file go130, what else is there?   _______________________
  13. Change to the directory where device files are kept
    Get a listing of files including all details and make it display one page at a time.
    What command did you use?  ____________________________________
    What type of file is hda?   _______________________________________
    What type of file is tty1?   ______________________________________
  14. Shutdown the PC from the command line.
    What command did you use?   ___________________________________