UNIX Interview Questions 1. What is the difference between Touch & cat command 2. How do you create a file in UNIX 3. What is the difference between pipe (|) and tee command in unix 4. Write a command to find all of the files which have been ac cessed within the last 30 days. 5. How we will execute previous command in vi editor? 6. How to get a particular par ticular string as your prompt ? Give syntax of that command? 7. Give a regular expression that finds two things, try to come up with regular expressions that find each individually using "egrep0" command? 8. What is the use of "test" command in unix? 9. In vi editor how do you execute unix commands? 10. How do you find path of a directory? Give its syntax. 11. What is the basic difference between unix and windows operating systems? 12. How do you remove a crontab file? 13. How do you know about running processes of a particular user? 14. Through which command will redirec t output to both screen and files at the same time 15. What is the use of pipes? 16. Which command will you use to change the permissions on file? 17. What is the procedure of "a t" and crontab" commands? 18. How do you stop a running process? 19. How do you move a process which is running background to foreground? 20. What is the syntax of grep command and what is its use? 21. Suppose 1000 processes are running on the system out of those if you have to show only certain process ids which command will you use 22. What is pid? 23. How do you copy a directory with many files and folders into another directory? 24. what do you understand bythe term 'de-mountable volumes'?
25. what do you understand by 'unix is a portable os'? 26. what are processor execution levels and priorities? 27. distinguish between multi-tasking,multi-user,multi- processing and time sharing? 28. Distinguish between physical addresses and logical address? 29. What is virtual machine? 30. Distinguish between interrupts and exceptions? 31. Distinguish between user mode and kernel mode? 32. Distinguish between paging and swapping? 33. What do you understand by 'building block primitive'? 34. What is the advantage of eac h user having its own copy of the s hell? 35. What does a process mean? 36. Briefly, how do you install Oracle software on UNIX? 37. Give two UNIX kernel parameters that effect an Oracle install 38. How would you change all occurr ences of a value using VI? 39. Explain iostat, vmstat and netstat. 40. Give the command to display space usage on the UNIX file system. 41. The difference between a soft link and a hard link? 42. Explain the read, write, and execute permissions on a UNIX directory. 43. What UNIX command will control the default file permissions when files are created? 44. How do you execute a UNIX command in the background? 45. How do you list the files in an UNIX directory while also showing hidden files? 46. How do you change your account's password? 47. What is shell? 48. What is kernel? 49. What are the differences between CUI and GUI interfaces? 50. What are the different hardware’s available?
51. what are the different operating systems available? 52. If we want to see first 35 lines of a file which command we have to use? 53. What are the different commands used to view the contents of a file? 54. How to delete a directory containing files and folders? 55. What are the different commands used to create files? 56. How to rename files and folders? 57. Will rm -r* removes hidden files? 58. Which command is used to identify the type of the file? 59. How to view the hidden files in /etc directory? 60. How to identify whether a file is normal file or directory? 61. How to get the operating system's information in UNIX? 62. What is the functionality of kernel in UNIX architecture? 63. What are the uses of filters? 64. How to redirect standard error to a file? 65. What is the use of wild cards? 66. What is the use of "fg" command ? 67. What is the use of nice command? 68. Which command is used to change group? 69. What is the significance of "su" command? 70. In UNIX file permissions what does the second field denotes? 71. How to remove a crontab file? 72. What is the difference between "cron" command and "at" command? 73. What does the job command do? 74. How to create hardlinks and softlinks on files?
75. What does the command 'wc' do? 76. What does the 'tee' command do?
77. What is the function of grep command? 78. What are filters? 79. Can a process kill itself in UNIX/or in its various versions? 80. How to convert a hidden file to normal visible file?
81. What is telnet? 82. What is the shell for dos,NT operating systems? 83. What is tar command and what are the different types of tar commands? 84. What is the use of uniq command? 85. What is the difference between commands cmp and diff? 86. What is the difference between relative path and absolute path? 87. What are wild cards? 88. What is the command to find out the difference between files and folders? 89. What is the command to find out which shell you are running? 90. How to copy file into directory?
91. How do you check for processes started by particular user suppose the user name is 'Suresh'?
92. What is the command to get help on a UNIX terminal? 93. What is the command to view contents of a large error log file?
94. What is the command to edit contents of the file? 95. How do you find out all processes that are currently running in UNIX OS? 96. The command grep first second third /usr/you/myfile a) prints lines containing the words first, second or third from the file /usr/you/myfile b) searches for lines containing the pattern first in the files second, third, and /usr/you/myfile and prints them c) searches the files /usr/you/myfiel and third for lines containing the words first or second and prints them d) replaces the word first with the word second in the files third and /usr/you/myfile e) None of the above 97. in unix echo is used for
98. fork in unix? 99. What command would users use to see what file one page at a time in UNIX?
100. What command a user use to view a long text file one page at a time in UNIX? 101.
How does the user view the contents of a text file in UNIX?
102.
How does a user get the current date, time in UNIX?
103.
Give command that will make the file "run.sh" executable?
104.
Give Command that will move a single file called "unix.txt"
105.
What command is used to replace the existing string with some other?
106. What is the main advantage of creating links to a file instead of copies of the file? 107. What are each of the standard files and what are they normally associated with? 108.
Could you tell something about the Unix System Kernel?
109.
How to remove weird filenames?
110.
How to setup display for a remote system?
111.
What do you mean by nice value?
112.
What are the processes that are not bothered by the swapper? Give Reason
113.
What is Expansion swap?
114.
What is Fork swap?
115.
What do you mean by u-area (user area) or u-block?
116. What are the events done by the Kernel after a process is being swapped out from the main memory? 117.
What is a Region?
118.
What is a Map?
119.
What is the difference between Swapping and Paging?
120. What is major difference between the Historic Unix and the new BSD release of Unix System V in terms of Memory Management? 121.
How does the inode map to data block of a file?
122.
What are the mount and unmount system calls?
123.
How do you create special files like named pipes and device files?
124.
What is a FIFO?
125.
What is 'inode'?
126.
How are devices represented in UNIX?
127.
What are the read or write or execute bits on a directory mean?
128.
What does iostat do?
129.
What does the route command do?
130.
What are the main differences between Apache 1.x and 2.x?
131.
What steps are required to perform a bare-metal recovery?
132.
What is a level 0 backup?
133.
What is an incremental backup?
134. Name key files or directories on a Windows system that should always be backed up? 135. Name key files or directories on a UNIX system that should always be backed up? 136.
From command line how will you add a user account?
137.
What is a profile?
138.
What happens when we create a file system?
139.
What is a pipe?
140.
What is egrep?
141.
What is the difference between grep & find?
142.
What are default permissions for others in a file?
143.
How to put a job in background & bring it to foreground?
144.
What is a daemon?
145.
How to recover a system whose root password has lost?
146.
What is RAID 1+0?
147.
How to list only the directories inside a directory?
148.
What does init do? What does inetd do?
149.
What is an inode?
150.
What does mknod do? What’s a named pipe?
151.
What is setuid/setgid in relation to file permissions?
152.
What scripting languages do you know?
153.
How many VI editor modes do you know?
154.
What is the difference between > and >> operators?
155.
What is the difference between internal and external commands?
156.
What is a filesystem?
157.
How do you log in to a remote UNIX box?
158.
what is the name os the first os and tell me the year when it was discovered
159.
fork()?
160.
Very first process created by kernel?
161.
Process id for kernel process?
162.
What are the files in /etc directory?
163.
In UNIX inter process communication take place using?
164. interprocess command in unix be achieved by a)pipes b)messages c)semaphores d)shared memory e)all
165.
The very first process created by the kernel that runs till the kernel process is halts is
166.
The UNIX shell is.... a).does not come with the rest of the system b).forms the interface between the user and the kernel c) does not give any scope for programming d) does not allow calling one program from with in another e) all of the above
167.
in unix profile contains
168.
How to connect oracle database from unix
169.
What are Profilers?
170.
Display the Disk Usage of file sizes under each directory in current Directory?
171.
Set the Display automatically for the current new user?
172. What does the following command line produce? Explain each aspect of this line. $ (date ; ps -ef | awk {print $1}' | sort | uniq | wc -l ) >> Activity.log 173.
What is the most graceful way to get to run level single user mode?
174.
difference between Tcp and udp
175.
How can you find configuration on Linux?
176.
What does the top command display?
177.
How you will uncompress the file?
178.
In LINUX, What are two subtle differences in using the more and the pg commands?
179.
What is LILO?
180. What file should you examine to determine the defined runlevels for your system? 181.
What is the complete name of the default configuration file for LILO?
182.
What text filter can you use to display a binary file in octal numbers?
183.
What is the name and path of the main system log?
184.
What is the minimum number of partitions you need to install Linux?
185.
What command can you use to review boot messages?
186.
What utility can you use to automate rotation of logs?
187. You want to create a compressed backup of the users' home directories. What utility should you use? 188.
Where is standard output usually directed?
189.
Who owns the data dictionary?
190. How does the boot process[init levels] work on Linux? How is it different from Solaris?
191.
What are RPM? s, what do they offer?
192.
Tell me some of the Linux Hotkeys do you know?
193.
How can you see all mounted drives?
194. Which directory is closer to the top of the file system tree, parent directory or current directory?
195.
What is the difference between home directory and working directory?
196.
What is the difference between an argument and an option/switch?
Source: http://www.allinterview.com Linux admin interview questions Unix/Linux interview questions 1. How do you take a single line of input from the user in a shell script? 2. Write a script to convert all DOS style backslashes to UNIX style slashes in a list of files. 3. Write a regular expression (or sed script) to replace all occurrences of the letter ‘f’, followed by any number of character s, followed by the letter ‘a’, followed by one or more numeric characters, followed by the letter ‘n’, and replace what’s found with the string “UNIX”. 4. Write a script to list all the differences between two directories. 5. Write a program in any language you choose, to reverse a file. 6. What are the fields of the password file? 7. What does a plus at the beginning of a line in the password file signify? 8. Using the man pages, find the correct ioctl to send console output to an arbitrary pty. 9. What is an MX record? 10. What is the prom command on a Sun that shows the SCSI devices? 11. What is the factory default SCSI target for /dev/sd0? 12. Where is that value controlled? 13. What happens to a child process that dies and has no parent process to wait for it and what’s bad about this? 14. What’s wrong with sendmail? What would you fix? 15. What command do you run to check file system consistency? 16. What’s wrong with running shutdown on a network? 17. What can be wrong with setuid scripts? 18. What value does spawn return? 19. Write a script to send mail from three other machines on the network to root at the machine you’re on. Use a ‘here doc’, but include in the mail message the name of the machine the mail is sent from and the disk utilization statistics on each machine? 20. Why can’t root just cd to someone’s home directory and run a program called a.out sitting there by typing “a.out”, and why is this good? 21. What is the difference between UDP and TCP? 22. What is DNS? 23. What does nslookup do? 24. How do you create a swapfile? 25. How would you check the route table on a workstation/server? 26. How do you find which ypmaster you are bound to? 27. How do you fix a problem where a printer will cutoff anything over 1MB? 28. What is the largest file system size in solaris? SunOS?
29. What are the different RAID levels?
Source: http://www.techinterviews.com