Explore topic-wise MCQs in Unix.

This section includes 21 Mcqs, each offering curated multiple-choice questions to sharpen your Unix knowledge and support exam preparation. Choose a topic below to get started.

1.

The command is valid.

A. True
B. FalseView Answer
Answer» B. FalseView Answer
2.

What will the result when we evaluate this statement?

A. output of pwd command along with string pwd=
B. undefined output
C. erroneous
D. directory variable will hold string pwdView Answer
Answer» B. undefined output
3.

The variable assignment as x = 10 (whitespace on both sides of =) will work if we are not using C shell?

A. True
B. False
Answer» C.
4.

C shell uses which command for assigning values to variables?

A. =
B. set
C. unset
D. $
Answer» C. unset
5.

readonly command is used to protect a variable from reassignment.

A. True
B. False
Answer» B. False
6.

A variable can be removed using _____

A. unset
B. readonly
C. del
D. bash
Answer» B. readonly
7.

Which of the following shell doesn’t support the command substitution using $ recommended by POSIX?

A. Korn
B. bash
C. C
D. bourne
Answer» E.
8.

POSIX recommends the use of ____ instead of archaic `command ` for command substitution.

A. |
B. #
C. %
D. $
Answer» E.
9.

READONLY_COMMAND_IS_USED_TO_PROTECT_A_VARIABLE_FROM_REASSIGNMENT.?$

A. True
B. False
Answer» B. False
10.

The variable assignment as x = 10 (whitespace on both sides of =) will work if we are not using C shell?$

A. True
B. False
Answer» C.
11.

C shell uses which command for assigning values to variables?$

A. =
B. set
C. unset
D. $
Answer» C. unset
12.

Command substitution requires the command to use ________

A. standard input
B. standard output
C. standard error
D. all of the mentioned
Answer» B. standard output
13.

Which of the following is not a system defined variable?

A. $PATH
B. $HOME
C. $SHELL
D. $cd
Answer» D. $cd
14.

A variable can be removed using ____?

A. unset
B. readonly
C. del
D. bash
Answer» B. readonly
15.

Which of the following is a correct initialization of variables to null strings?

A. x=
B. x=’ ‘
C. x=” “
D. x=, x=’ ‘, x=” “
Answer» E.
16.

Which symbol is used for evaluation of variables?

A. $
B. &
C. =
D. @
Answer» B. &
17.

Which symbol is used for assigning a value to variables?

A. $
B. &
C. =
D. @
Answer» D. @
18.

Which of the following shell doesn’t support the command substitution using $ recommended by POSIX?$

A. Korn
B. bash
C. C
D. bourne
Answer» E.
19.

Command substitution is enabled in single quotes also.

A. True
B. False
Answer» C.
20.

Which of the following meta-character is used in command substitution?

A. `
B. ‘
C. “
D. >
Answer» B. ‚Äö√Ñ√∂‚àö√ë‚àö‚â§
21.

Shell enables one or more arguments to be obtained from the standard output of another command. This feature is called _________

A. command substitution
B. argument substitution
C. shell substitution
D. korn
Answer» B. argument substitution