Home » Unix MCQ Answers

Unix MCQ Answers

Unix MCQ Answers. Get all of the validated answers for the unix mcq. Ideal for quick and fast review or getting ready for the actual test. if you have short time then you are on right place.

Unix MCQ Answers

This is the unix mcq with 100% correct answers:

Q1. For running a Unix command within awk, we’ve to use ____ function.

  1. split
  2. substr
  3. length

Q2. To extract specific columns from a file ____ command is used.

  1. pr
  2. head
  3. tail

Q3. Which of the following cannot be performed by cat command?

  1. appending files
  2. creating files
  3. displaying files

Q4. What is the default delimiter used by the cut command for cutting fields?

  1. underscore
  2. space
  3. double tab

Q5. Which of the following is not an internal command used by mailx?

  1. d
  2. N
  3. q

Q6. Which of the following is not true about Unix?

  1. Linux is also known as a version of UNIX
  2. A user can run multiple programs at the same time; hence UNIX is called a multitasking environment
  3. Many people can use a UNIX based computer at the same time; hence UNIX is called as a multiuser system

Q7. Which editor is used by the Unix system to edit files?

  1. word
  2. notepad++
  3. notepad

Q8. Which of the following is not a part of all the versions of Unix?

  1. System Calls
  2. Kernel and Shell
  3. Commands and utilities

Q9. Which part of the Unix operating system interacts with the hardware?

  1. Application program
  2. Vi editor
  3. Shell

Q10. Which command is used to display the documentation of commands in Unix?

  1. whatis
  2. help
  3. search

Q11. Which Unix command is used for changing the current directory?

  1. pwd
  2. rm
  3. cp

Q12. Which command is used for printing the current working directory?

  1. dir
  2. HOME
  3. cd

Q13. Which command is used for listing files in a directory?

  1. list
  2. wc
  3. ps

Q14. Which command is used by the user to change their login password in Unix?

  1. cp
  2. man
  3. reset

Q15. Which command is used for displaying the contents of a file in Unix?

  1. mkdir
  2. rm
  3. cp

Q16. Which command is used to compress files?

  1. gunzip
  2. comm
  3. cmp

Q17. Which command is used for displaying the beginning of a file in Unix?

  1. lp
  2. begin
  3. pr

Q18. Which symbol is used with the tail command to print the file from the selected line?

  1. %%
  2. ^
  3. –

Q19. Which command is used to delete all files in a directory?

  1. del *
  2. mv *
  3. rmdir *

Q20. echo command is used for _________

  1. displaying date and time
  2. displaying errors
  3. displaying operating system details

Q21. What is the function of cp command in Unix?

  1. delete a given file
  2. change the directory
  3. list all the available files in the current directory

Q22. Which command is used for removing/deleting files in Unix?

  1. mv
  2. rmdir
  3. del

Q23. Which command is used for renaming files in Unix?

  1. rename
  2. move
  3. cp

Q24. Which command is used for comparing two files?

  1. comp
  2. comm
  3. diff

Q25. Which Unix command is used for counting words, lines, and characters in a file?

  1. man
  2. count
  3. diff

Q26. In UNIX, which command is used to change the permissions of a file?

  1. chown
  2. chgrp
  3. ch

Q27. Which symbol is used to change permissions for hidden files in Unix?

  1. *
  2. $
  3. &

Q28. Which command is used for saving and quitting the vi editor simultaneously?

  1. :f
  2. :q
  3. :w

Q29. How can we escape to the UNIX shell without quitting vi editor?

  1. using ‘:sh’ command
  2. using ctrl-Z
  3. using ctrl-D

Q30. For creating and removing directories, which of the following system calls are used?

  1. mkdir and rmdir
  2. rmdir and chown
  3. chdir and chown

Q31. Which of the following files are known as special files in Unix?

  1. /dev/null
  2. sample.txt
  3. /dev/tty

Q32. What is the output of the following Unix command?

  1. size of each .c file
  2. erroneous
  3. undefined

Q33. In Unix, for what purpose bc command is used?

  1. for copying files
  2. as a process table viewer
  3. as an editor

Q34. Which process is immediately set up by the kernel when we log on to a Unix system?

  1. System
  2. bash
  3. parent

Q35. Which command shows some attributes of a process?

  1. HOME
  2. $$
  3. pid

Q36. Which of the following system call is used for creating a new process in Unix?

  1. new
  2. wait
  3. read

Q37. Which of the following command is used to create a child shell?

  1. env
  2. wait
  3. fork

Q38. Which Unix command is used for locating files?

  1. type
  2. loc
  3. search

Q39. Which command is used for preparing a file for printing?

  1. print
  2. cat
  3. cd

Q40. Which command is used for sorting a file on specified fields?

  1. pr
  2. cut
  3. tail

Q41. Which Unix command is used for locating repeated and non-repeated lines?

  1. cut
  2. paste
  3. sort

Q42. Which command is used for translating characters?

  1. paste
  2. trans
  3. sort

Q43. Which of the following command will be used for searching “director” in emp.lst?

  1. grep -director emp.lst
  2. grep -v “director” emp.lst
  3. grep “director”

Q44. Which of the following command is used for searching for a pattern in one or more file(s.?

  1. paste
  2. cd
  3. cp

Q45. Which of the following commands is known as stream editor?

  1. grep
  2. tr
  3. td

Q46. What is a shell script?

  1. group of functions
  2. a file containing special symbols
  3. group of commands

Q47. To run the script, we should make it executable first by using _____

  1. chmod +w
  2. chmod +rwx
  3. chmod +r

Q48. Which command is used for acquiring superuser status?

  1. pu
  2. super
  3. admn

Q49. Which command is used to find out the consumption of a specific directory?

  1. mem
  2. dv
  3. df

Q50. Which filter apart from perl, is the most powerful?

  1. grep
  2. cut
  3. sed

Q51. What is Unix?

  1. Unix is a programming language
  2. Unix is a software program
  3. Unix is a text editor

Q52. The Unix shell is both _______ and _______ language.

  1. high level, low level
  2. interactive, responsive
  3. interpreter, executing

Q53. In which language UNIX is written?

  1. C++
  2. JAVA
  3. Python

Q54. Which of the following is the first UNIX editor?

  1. vi
  2. emacs
  3. ex

Q55. Which of the following is not a feature of Unix?

  1. multiuser
  2. multitasking
  3. portability

Also Read: Compiler Design MCQ Answers

Note: If you have the new question on this test, please comment Question and Multiple-Choice list in form below this article. We will update answers for you in the shortest time. Thank you! We truly value your contribution to the website.

Leave a Reply

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