Shell Processes   «Prev  Next»

Running Shells from the Command Line - Exercise

Starting other Shells

Objective:Practice running a new shell from your shell account


The UNIX labs use the C shell, which means that that shell would already be running when people log in. In this exercise, you will practice creating new interactive shells from the command line. Follow the instructions listed below.
  1. Login to your shell account.
  2. Run the following commands to see which processes you are running.
  3. ps
  4. Verify that your current shell is listed by looking up the PID number of your current shell.
  5. echo $$
  6. Do you see a correspondence between the number displayed by this echo command and the output of ps?
  7. Now, create a Korn shell
  8. /bin/ksh
The Korn shell is now running in the foreground. Your prompt should change to indicate that you are running a Korn shell.
  1. Verify that both your shells are running. Your login shell should be running in the background and the Korn shell in the foreground.
  2. ps
  3. echo $$
Do you see that the number produced by the echo command matches the Korn shell listed in the ps output?
  1. Logout of your account. To do this, use the exit command to exit the Korn shell first. This will bring your login shell into the foreground. You may then exit your login shell and this should log you off of the machine.
  2. exit
  3. exit

Submitting your exercise

This exercise is auto-scored; when you complete the exercise, click the Submit button to receive full credit.