Shell Programming  «Prev  Next»

Shell Scripts within unix - Exercise

Explore a sample script

Objective: Locate and view an existing script on your UNIX system.

Exercise scoring

This exercise is worth two points.

Background/overview

Log onto a linux machine or if you have a Mac open the terminal for Mac OS X.

Instructions

  1. Launch your Telnet program.
  2. Verify your program settings. Choose your preferred cursor style, and make sure that terminal emulation is set correctly. The emulation choice will appear either as vt100 or VT-100.
  3. Under the Connect menu, choose the Remote System menu item to open the Connect dialog box.
  4. In the Connect dialog box, specify the machine name you are connecting to: labs.dispersednet.com. If you are using your own shell account, type the host name for that account. The Port: field should have Telnet selected.
  5. Press the Connect button to see a login screen.
  6. On the login screen, enter your user ID and password at the prompts (you should have received your user ID and password in Module 1).
  7. If you make a typing mistake, a Login incorrect message appears, and you must retype your user ID and password when prompted.
  8. Enter this command to change to a system startup directory containing many scripts:
     
    cd /etc/init.d
    
  9. Use the ls command to view the contents of the directory.
  10. Use this command to view the script that starts the system logging service when the UNIX computer is booted: more syslog
  11. When you have finished, type logout and press Enter. Your session ends and Telnet disconnects.