100 TOP UNIX Multiple Choice Questions and Answers

UNIX Multiple Choice Questions :-

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. What is the purpose of the shell?
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. What is the command to find the differences in the lines containing “2011” between the files a1.txt and a2.txt
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?

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?

15. Which part of UNIX is responsible for sending basic instructions to the computer’s processor?
A. Kernel
B. Shell
C. Both

UNIX Objective Questions ::

Leave a Reply

Your email address will not be published. Required fields are marked *