Shell Processes   «Prev  Next»

Shells and Processes - Quiz

Each question is worth one point. Select the best answer for each question.
 
1. Look at the following ps –f command output.
$ ps -f

     UID   PID  PPID  C    STIME TTY      TIME CMD

 sbarr59  3763  3762  0 00:20:09 pts/1    0:00 /bin/sh

 sbarr59  3762  3750  0 00:20:03 pts/1    0:00 /bin/ksh

 sbarr59  3750  3748  0 00:19:23 pts/1    0:00 /bin/csh
Which shell is the parent process of the Korn shell seen in the listing above?
Please select the best answer.
  A. The Korn Shell
  B. The Bourne shell
  C. The C shell
  D. The bash shell

2. Which one of the following files contains the name of your login shell?
Please select the best answer.
  A. /etc/passwd
  B. /etc/login
  C. /etc/hosts
  D. /etc/profile

3. When a shell script begins, it has an initial value for the PATH variable. Where does this value come from?
Please select the best answer.
  A. It’s passed down from the script’s parent shell.
  B. It’s passed up from the script’s child shell.
  C. It’s read by the script from the /etc/profile file.
  D. It’s read by the script from the .profile file.

Correct answers:

Your Score: 0