BSCIT – SEM V Linux System Administration MCQ

1. Which of the following is not a type of shell?

A. The Shell B. The Korn Shell C. The D. The Perl Shell

2. Which of the following is true about shell?

A. A Shell provides you with an interface to the Unix system. B. Shell gathers input from you and executes programs based on that input. C. Shell is an environment in which we can run our commands, programs, and shell scripts. D. All of the above

3. What will be the output of $date?

A. Yesterday date B. Current date C. Current date and time D. Tomarrow date and time

4. The original was written in the mid ______.

A. 1960s B. 1970s C. 1980s D. 1990s

5. The original Unix shell was written by ______.

A. Stephen R. Bourne B. Stephen R. Korn C. Stephen R. C. D. Stephen Watson

6. On a UNIX system, there can be ____ shells running simultaneously.

A. 2 B. 3 C. 4 D. Many

7. The prompt issued by the shell is called ______

A. prompt B. command translator C. command prompt D. command executor

8. In UNIX there are ___ major types of shells.

A. 2 B. 3 C. 4 D. 5

9. What is the default symbol for command prompt in Bourne shell?

A. ! B. # C. $ D. @

10. Which shell is the most common and best to use?

A. Korn shell B. C. Bourne shell D. Shell

11. Which symbol is used for taking input from standard input?

A. & B. % C. - D. $

12. Which of the following symbol(s) can be used to redirect the output to a file or another program?

A. | B. > C. >> D. All of the above

13. The >> symbol is used to overwrite the existing file if it exists and | is used to give input to another program.

A. True, False B. True, True C. False, True D. False, False

14. We can redirect the error message to file named newfile using ______command.

A. cat foo errorfile B. cat foo >errorfile C. cat errorfile>foo D. cat foo 2>errorfile

15. Which symbol is used to redirect error messages to /dev/null?

A. < B. > C. % D. $

16. Which command saves one copy of character stream in a file and store the other to standard output?

A. who B. tee C. ls D. wc

17. Which of the following is not true about tee command?

A. it is a feature of the shell B. it is an external command C. tee command duplicates its input D. tee is an internal command

18. A ______is used to redirect input into an interactive or program.

A. document B. here C. here document D. who

19. What is the use of pgm < file command?

A. Output of pgm is redirected to file B. Program pgm reads its input from file C. Output of pgm is appended to file D. Takes output from one program, or process, and sends it to another

20. What is the use of n >& m command?

A. Merges output from stream n with stream m B. Merges input from stream n with stream m C. Both A and B D. None of the above

21. The name of a variable can contain ______.

A. numbers B. letters C. underscore character D. All of the above

22. Unix shell variables will have their names in _____.

A. Uppercase B. Lowercase C. First character Uppercase and all other character Lowercase D. First character Lowercase and all other character Uppercase

23. Whch of the following is invalid variable names?

A. VAR_1 B. _ALI C. VAR1 D. VAR_A!

24. Shell variables are of ____ types.

A. 3 B. 4 C. 2 D. 5

25. Which of the following command is used to display the environment variables only?

A. sh B. set C. env D. var