unix mcq questions with answers pdf | Computer Science

Unix MCQ Quiz & Online Test: Read best Unix MCQ Questions, that check your basic knowledge of the Unix Operating System.Unix MCQ Questions and Answers with Pdf Download, Here learn quiz questions and answers and download pdf of 30 important objective questions with answers .Unix Objective Questions Mcqs Online Test Quiz faqs for Computer Science. Unix Objective Questions Mcqs Online Test Quiz faqs for Computer Science.

1. Which of the following is not true about Unix?1
a) UNIX was not written in ‘C’ language
b) Linux is also known as a version of UNIX
c) A user can run multiple programs at the same time; hence UNIX is called a multitasking environment
d) Many people can use a UNIX based computer at the same time; hence UNIX is called as a multiuser system
Answer: a 

2. Which command is used for printing the current working directory?
a) dir
c) cd
d) pwd
Answer: d

$ pwd

3. Which of the following commands is known as stream editor?
a) grep
b) tr
c) sed
d) td
Answer: c
4. What is a shell script?
a) group of functions
b) a file containing a series of commands
c) a file containing special symbols
d) group of commands
Answer: b

5. Which command is used to find out the consumption of a specific directory?
a) mem
b) dv
c) du
d) df
Answer: c
6. Which filter apart from perl, is the most powerful?
a) awk
b) grep
c) cut
d) sed
Answer: a
7. Which process is immediately set up by the kernel when we log on to a Unix system?
a) System
b) bash
c) shell
d) parent
Answer: c
8. Which command shows some attributes of a process?
b) ps
c) $$
d) pid
Answer: b
9. Which of the following system call is used for creating a new process in Unix?
a) new
b) wait
c) read
d) fork
Answer: d
10. Which of the following command is used to create a child shell?
a) sh
b) env
c) wait
d) fork
Answer: a
11. Which Unix command is used for locating files?
a) type
b) loc
c) find
d) search
Answer: c
12. For running a Unix command within awk, we’ve to use ____ function.
a) split
b) system
c) substr
d) length
Answer: b

13. Which of the following cannot be performed by cat command?
a) appending files
b) deleting files
c) creating files
d) displaying files
Answer: b
14. What is the default delimiter used by the cut command for cutting fields?
a) underscore
b) space
c) tab
d) double tab
Answer: c
15. Which of the following is not an internal command used by mailx?
a) d
b) N
c) a
d) q
Answer: c

16. To extract specific columns from a file ____ command is used.
a) cut
b) pr
c) head
d) tail
Answer: a

17. To run the script, we should make it executable first by using _____
a) chmod +w
b) chmod +rwx
c) chmod +x
d) chmod +r
Answer: c

18. Which command is used for listing files in a directory?
a) list
b) ls
c) wc
d) ps
Answer: b

$ ls

19. Which command is used for removing/deleting files in Unix?
a) rm
b) mv
c) rmdir
d) del
Answer: a

20. Which symbol is used to change permissions for hidden files in Unix?
a) *
b) $
c) &
d) .

Answer: d

21. Which command is used for saving and quitting the vi editor simultaneously?
a) ‘:x’
b) :f
c) :q
d) :w
Answer: a

22. How can we escape to the UNIX shell without quitting vi editor?
a) using ‘:sh’ command and using ctrl-Z
b) using ‘:sh’ command
c) using ctrl-Z
d) using ctrl-D
Answer: a
23. Which command is used for comparing two files?
a) comp
b) cmp
c) comm
d) diff
Answer: b

$ cmp  file01  file02
file01  file02 differ: Byte 20, Line 2

24. Which command is used by the user to change their login password in Unix?
a) cp
b) man
c) reset
d) passwd
Answer: d

25. Which editor is used by the Unix system to edit files?
a) word
b) notepad++
c) vi
d) notepad
Answer: c
26. Which command is used for displaying the beginning of a file in Unix?

a) lp
b) begin
c) pr
d) head
Answer: d
$ head emp.lst

27. Which symbol is used with the tail command to print the file from the selected line?
a) %%
b) ^
c) +
d) –
Answer: c
$ tail +11 emp.lst // start printing from 11th line onwards

28. Which command is used to delete all files in a directory?
a) del *
b) rm *
c) mv *
d) rmdir *
Answer: b
29. Which of the following is not a part of all the versions of Unix?

a) System Calls
b) Graphical user interface
c) Kernel and Shell
d) Commands and utilities
Answer: b

30. In Unix, for what purpose bc command is used?
a) for copying files
b) as a process table viewer
c) as an editor
d) as a calculator
Answer: d

Leave a Reply

Your email address will not be published.