Unix Interview Questions and Answers
Difficulty Level: AllBeginnerIntermediateExperienced/Expert
Ques 1. Explain the steps that a shell follows while processing a command.
Ques 2. What difference between cmp and diff commands?
Ques 3. What is the use of ?grep? command?</SPAN><SPAN class="answers">
</SPAN>
Ques 4. What is the difference between cat and more command?
Ques 5. Write a command to kill the last background job?
Ques 7. Write a command to display a file?s contents in various formats?
Ques 8. What will the following command do?
Ques 9. Is it possible to create new a file system in UNIX?
Ques 10. Is it possible to restrict incoming message?
Ques 11. What is the use of the command "ls -x chapter[1-5]"
Ques 12. Is 'du' a command? If so, what is its use?
Ques 13. Is it possible to count number char, line in a file; if so, How?
Ques 14. Name the data structure used to maintain file identification?
Ques 15. How many prompts are available in a UNIX system?
Ques 16. How does the kernel differentiate device files and ordinary files?
Ques 17. How to switch to a super user status to gain privileges?
Ques 18. What are shell variables?
Ques 20. How to terminate a process which is running and the specialty on command kill 0?
Ques 21. What is a pipe and give an example?
Ques 22. Explain kill() and its possible return values.
Ques 23. How are devices represented in UNIX?
Ques 25. Brief about the directory representation in UNIX
Ques 26. What are the Unix system calls for I/O?
Ques 27. What are links and symbolic links in UNIX file system?
Ques 29. How do you create special files like named pipes and device files?
Ques 30. Discuss the mount and unmount system calls
Ques 31. How does the inode map to data block of a file?
Ques 32. What is a shell?</SPAN><SPAN class="answers">
</SPAN>
Ques 33. Brief about the initial process sequence while the system boots up.
Ques 34. What are various IDs associated with a process?
Ques 35. Explain fork() system call.
Ques 38. List the system calls used for process management:
Ques 39. How can you get/set an environment variable from a program?:
Ques 40. How can a parent and child process communicate?
Ques 42. What are the process states in Unix?
Ques 43. What Happens when you execute a program?</SPAN><SPAN class="answers">
</SPAN>
Ques 44. What Happens when you execute a command?
Ques 46. What is 'ps' command for?
Ques 47. How would you kill a process?
Ques 48. What is an advantage of executing a process in background?
Ques 49. How do you execute one program from within another?
Ques 50. What is IPC? What are the various schemes available?
Ques 51. What is the difference between Swapping and Paging?
Ques 53. What is the main goal of the Memory Management?</SPAN><SPAN class="answers">
</SPAN>
Ques 58. Is the Process before and after the swap are the same? Give reason.
Ques 59. What do you mean by u-area (user area) or u-block?
Ques 62. What is Expansion swap?
Ques 63. How the Swapper works?
Ques 65. What are the requirements for a swapper to work?
Ques 66. What are the criteria for choosing a process for swapping into memory from the swap device?
Ques 68. What do you mean by nice value?
Ques 69. What are conditions on which deadlock can occur while swapping the processes?
Ques 70. What are conditions for a machine to support Demand Paging?
Ques 71. What is ?the principle of locality??
Ques 72. What is the working set of a process?
Ques 73. What is the window of the working set of a process?
Ques 74. What is called a page fault?
Ques 75. What are data structures that are used for Demand Paging?
Ques 76. What are the bits that support the demand paging?</SPAN><SPAN class="answers">
</SPAN>
Ques 78. Difference between the fork() and vfork() system call?
Ques 79. What is BSS(Block Started by Symbol)?
Ques 80. What is Page-Stealer process?
Ques 81. Name two paging states for a page in memory?
Ques 82. What are the phases of swapping a page from the memory?
Ques 83. What is page fault? Its types?
Ques 84. In what way the Fault Handlers and the Interrupt handlers are different?
Ques 85. What is validity fault?
Ques 86. What does the swapping system do if it identifies the illegal page for swapping?
Ques 88. In what way the validity fault handler concludes?
Ques 89. At what mode the fault handler executes?
Ques 90. What do you mean by the protection fault?
Ques 91. How the Kernel handles the copy on write bit of a page, when the bit is set?
Ques 92. For which kind of fault the page is checked first?
Ques 93. In what way the protection fault handler concludes?
Ques 94. How the Kernel handles both the page stealer and the fault handler?
Ques 95. Explain different types of Unix systems.
Ques 96. Explain kernal and shell.
Ques 98. Which are typical system directories below the root directory?
Ques 99. Construct pipes to execute the following jobs.</SPAN><SPAN class="answers">
</SPAN>
Ques 100. Explain the following commands.
Ques 101. What is the significance of the ?tee? command?
Ques 102. What does the command ? $who | sort ?logfile > newfile? do?
Ques 103. What does the command ?$ls | wc ?l > file1? do?
Ques 104. Which of the following commands is not a filter man , (b) cat , (c) pg , (d) head