Unix Interview Questions
If you are fresher and looking for Unix Interview Questions And Answers then you are on right page. Candidates will get interview questions on Unix commands and Unix shell scripting interview questions and answers on this single page.
You have to make your basics concepts very strong on amdocs interview questions for testing unix sql. These UNIX command interview questions are mostly asked during Java development and Support role interviews on various investment banks.
Basic Unix Interview Questions
It really doesn’t matter much if you could not answer few questions but it matters that whatever you answered, you must have answered with confidence.So just feel confident during your interview.
These UNIX command interview questions are equally applicable for any job interview which requires some work on Unix Operating System. So candidates just scroll down this page to get complete Unix Interview Questions with their answer which is well structured below by the team of recruitmentresult.com.
Unix Interview Questions
UNIX is a computer operating system was developed at AT&T Bell Labs, Murray Hills, New Jersey in 1969.Unix is a portable operating system that allows running on different hardware systems as well as serves as stable, multi-user, multitasking set of programs that links the computer with users.
Question1: What is UNIX?
Answer: It is a portable operating system that is designed for both efficient multi-tasking and mult-user functions. Its portability allows it to run on different hardware platforms. It was written is C and lets user do processing and control under a shell.
Question2: What are filters?
Answer: The term Filter is often used to refer to any program that can take input from standard input, perform some operation on that input, and write the results to standard output. A Filter is also any program that can be used between two other programs in a pipeline.
Question3: What is a typical syntax being followed when issuing commands in shell?
Answer: Typical command syntax under the UNIX shell follows the format:
|Command [argument] [argument] [–argument] [file]|
Question 4: Is there a way to erase all files in the current directory, including all its sub-directories, using only one command?
Answer: Yes, that is possible. Use “rm –r *” for this purpose. The rm command is for deleting files. The –r option will erase directories and sub directories, including files within. The asterisk represents all entries.
Question5: What is the chief difference between the –v and –x option s to set?
Answer: The –v option echoes each command before arguments and variables have been substituted for; the –x option echoes the commands after substitution has taken place.
Read Also: Interview Preparation Tips
Question6: What is the description for Kernel?
Answer: Kernel is the master program with UNIX operating system that controls the resources of the computer. The resources allocation to different users and tasks handle by this section. Kernel do not have direct communication with the user and it starts separate interactive program call shell to each user when login to the system.
Question7: What is a single user system?
Answer: A personal computer with an operating system which was designed to operate by a single user at a given time. Single user system becomes more popular since low-cost hardware and availability of wide range of software to perform difference tasks.
Question8: What are the main features of UNIX?
Answer: The main features of UNIX are as follows:
- Machine independent
- Multi-user operations
- Unix Shells
- Hierarchical file system
- Pipes and filters
- Background processors
- Development tools.
Question9:What is the difference between soft and hard links?
Answer: Soft links are link to the file name and can reside on different filesytem as well; however hard links are link to the inode of the file and has to be on the same filesytem as that of the file. Deleting the orginal file makes the soft link inactive (broken link) but does not affect the hard link (Hard link will still access a copy of the file)
Question10: How will you find the 99th line of a file using only tail and head command?
Answer: tail +99 file1|head -1
Question11: Name 5 variants of linux?
Answer: Redhat, Cent OS, Debian, Ubuntu and Fedora
Question12: What is difference between absolute and relative path?
Answer: A pathname is absolute if it is described in relation to root, so absolute pathnames always begin with a /. A pathname if it is relative to your current working directory is called as relative path. Relative pathnames never begin with /
Read Also: Common Interview Mistakes
Unix Production Support Interview Questions And Answers
Those who are going for JAVA Interview must have knowledge of JAVA as well as Unix, Linux, SQL and other scripting language. Candidates can collect various unix commands interview questions and answers as well as unix production support interview questions through this page. So have a look…
Question13: How will you find which operating system your system is running on in UNIX?
Answer: By using command “uname -a” in UNIX
Question14: How do you see command line history in UNIX?
Answer: Very useful indeed, use history command along with grep command in UNIX to find any relevant command you have already executed. Purpose of this Unix Command Interview Questions is probably to check how familiar candidate is from available tools in UNIX operation system.
Question15: What is difference between ps -ef and ps -auxwww?
Answer: This is indeed a good Unix Interview Command Question and I have faced this issue while ago where one culprit process was not visible by execute ps –ef command and we are wondering which process is holding the file.
ps -ef will omit process with very long command line while ps -auxwww will list those process as well.
Want to Know? In Which Color Interviewer Will Love To See You
Interview Questions On Unix Shell Scripting
Question16: What is called Shell?
Answer: The interface between user and system called a shell. Shell accepts commands and set them to execute for user operations.
Question 17: What are the responsibilities of a shell?
Answer: Following are the responsibilities of a shell:
- Program Execution
- Input/output redirection
- Filename and variable substitution
- Pipeline hookup
- Environment control
- Integrated programming language
Question18: What are the different types of commonly used shells on a typical linux system?
Answer: csh,ksh,bash,Bourne . The most commonly used and advanced shell used today is “Bash”
Question19: How will you connect to a database server from linux?
Answer: We can use isql utility that comes with open client driver as follows:
|isql –S serverName –U username –P password|
Question 20: What is the difference between grep and egrep?
Answer: egrep is Extendedgrep that supports added grep features like “+” (1 or more occurrence of previous character),”?”(0 or 1 occurrence of previous character) and “|” (alternate matching)
Get Answer Of This Question: How To Overcome Job Interview Fear
Unix Admin Interview Questions
Question 21: What is SWAP partition and why it is there?
Answer: Swap is what I like to think as a “separate Ram memory”, located on disk instead. If the Ram runs out of memory, then SWAP space is used. Linux separates physical RAM into chunks called pages. It is there to support the main memory when one runs out of it.
Question22: Permissions. How you change them? If you’ll be asked to create a file with read-only property, how can you achieve that*?
Answer: Basic rights are: Read, Write, Execute, and their meanings are straight forward. $chmod “permission parameters” is how you change them. If you want to view permissions on specific file or folder type $ls -l “fileName”
Changing permissions in Unix/Linux environment is what administrators do every day. You should have a throughout knowledge of permissions in Linux/Unix environments.
* read only file: $chmod 440
Question23: What is SUDO?
Answer: Sudo stands for SUPER-USER DO. It is used to run programs with security privileges of a superuser
Question24: What is PID? And how do you list TOP processes and how you kill one?
Answer: PID is Process ID, and for listing CPU intensive processes you use TOP command. Kill command following the process-id will terminate the process.
Question25: “Explain the boot process of Unix System in details”.
Answer: Boot process (as in all Operation Systems) is crucial to know how to deal with and understand. What is BIOS and why is it there? What about MBR, LILO and GRUB? What are run-levels? How can I make the system boot with a single user mode? Perhaps the way I can boot without the graphical user interface?
Be short and simple. Give explanations and try to simulate a real life event, for instance if you need to upgrade the crucial part of the system and users should be logged off what run-level you would choose? Etc.
You May Read This: Interview Preparation Tips for getting a Job
Unix Interview Questions For Testers
Question 26: How Does TheInode Map To Data Block Of A File
Answer: Inode has 13 block addresses. The first 10 are direct block addresses of the first 10 data blocks in the file. The 11th address points to a one-level index block. The 12th address points to a two-level (double in-direction) index block. The 13th address points to a three-level(triple in-direction)index block. This provides a very large maximum file size with efficient access to large files, but also small files are accessed directly in one disk read.
Question27: How To Check If A File Is Present In A Particular Directory In UNIX?
Answer: Using command, we can do it in many ways. Based on what we have learnt so far, we can make use of [ls] and [$?] command to do this. See below:
|$>ls –l file.txt; echo $?|
If the file exists, the [ls] command will be successful. Hence [echo $?] will print 0. If the file does not exist, then [ls] command will fail and hence [echo $?] will print 1.
Question28: How To List Down File/folder Lists Alphabetically?
Answer: Normally [ls –lt] command lists down file/folder list sorted by modified time. If you want to list then alphabetically, then you should simply specify: [ls –l]
Question29: How To Execute A Database Stored Procedure From Shell Script?
|$>SqlReturnMsg=`sqlplus -s username/password@database<<EOF|
Proc_Your_Procedure (… your-input-parameters …);
$> echo $SqlReturnMsg
Question 30:How To Tell If My Process Is Running In Unix?
Answer: You can list down all the running processes using [ps] command. Then you can “grep” your user name or process name to see if the process is running. See below:
|$>ps -e -o stime,user,pid,args,%mem,%cpu | grep “opera”|
14:53 opera 29904 sleep 60 0.0 0.0
14:54 opera 31536 ps -e -o stime,user,pid,arg 0.0 0.0
14:54 opera 31538 grep opera 0.0 0.0
Get Here: Tips For Dressing When Job-Hunting
We hope that you are satisfied with the content provided on this page regarding to Unix Interview Questions and Answers. You may subscribe to our free mail service to get instant mails in your mail box or follow us on face book and twitter.
Something That You Should Put An Eye On
|Group Discussion Tips||Difference Between Resume And CV|
|What Makes You Angry the Most?||Phone Interview Tips|
|Interview Questions and Answers||Develop Good Communication Skills|
|Personality Improvement Tips||How to Write a Good Resume|