Unix Quiz - 1

15 Questions
Unix Quizzes & Trivia

Unix Quiz

Please wait...
Questions and Answers
  • 1. 
    In Bourne shell, you have to EXPORT the declared environmental variables.
    • A. 

      True

    • B. 

      False

  • 2. 
    What does "../.." stand for ?
    • A. 

      Current directory

    • B. 

      Up one directory

    • C. 

      Up two directories

    • D. 

      None of Above

  • 3. 
    What does cd/ mean in UNIX?
    • A. 

      Current directory

    • B. 

      Root directory

    • C. 

      Up one directory

    • D. 

      None of the above

  • 4. 
    Which variable gives the exit status of the last command executed in the shell?
    • A. 

      $*

    • B. 

      $!

    • C. 

      $?

    • D. 

      $@

  • 5. 
    How will you assign the value of variable var2 to var1?
    • A. 

      Var1=var2

    • B. 

      $var1=$var2

    • C. 

      Var1=$var2

    • D. 

      $var1=var2

  • 6. 
    In UNIX, it is possible for more than one file descriptor to point to same file.
    • A. 

      True

    • B. 

      False

  • 7. 
    Which of these is true about assign a null value to the variable in bash?
    • A. 

      A=""

    • B. 

      A=

    • C. 

      A=''

    • D. 

      All of above

  • 8. 
    Command to change owner of the file in UNIX.
    • A. 

      Chowner

    • B. 

      Chown

    • C. 

      Both

    • D. 

      None

  • 9. 
    How many prompts are available in a UNIX system?
    • A. 

      One

    • B. 

      Two

    • C. 

      Three

    • D. 

      Zero

  • 10. 
    • A. 

      The shell keeps the end users from accessing the kernel for security reasons.

    • B. 

      The shell protects the kernel from the shortcomings of the user.

    • C. 

      The shell allows the user to do things that the kernel could not accommodate.

    • D. 

      All of above

  • 11. 
    • A. 

      Grep 2011 | diff a1.txt a2.txt

    • B. 

      Diff a1.txt a2.txt

    • C. 

      Diff a1.txt a2.txt | grep 2011

    • D. 

      None of above

  • 12. 
    What is the command to display environment variables?
    • A. 

      DISPLAY ENV

    • B. 

      PRINT ENV

    • C. 

      DISPENV

    • D. 

      PRINTENV

  • 13. 
    Output of the following: $ v= 'ls' $ echo $v
    • A. 

      List all files

    • B. 

      Ls

    • C. 

      Error

  • 14. 
    Which one is not the environment variable?
    • A. 

      PATH

    • B. 

      RANDOM

    • C. 

      READ

    • D. 

      DISPLAY

  • 15. 
    • A. 

      Kernel

    • B. 

      Shell

    • C. 

      Both