One of the most powerful multi-user operating systems, UNIX is still very famous today. It is used in environments that need maximum reliability. Whether you are looking for a position that entails basic UNIX commands or the one that needs you to write a code, UNIX helps you grow in your professional sphere. If you are confident to make a move in your career, prepare for UNIX interview questions and answers. Get, Set, Go!
Here is the list of most frequently asked interview questions and answers:
Q1. How can you create an archive file?
Ans. It can be created by using the tar command.
Q2. How to debug bash script?
Ans. Simply add –xv to #! /bin/bash
Q3. What is the difference between Linux and UNIX?
- It is not flexible like Linux
- UNIX is not free
- UNIX systems are categorized into various flavors, developed by commercial vendors and non-profit organizations
- It can be freely distributed through magazine, books, etc.
- Linux is compatible with most hardware systems
- It is highly scalable and supports a large set of file systems
Q4. Give an example on how to write function?
Echo “Hi everyone!”
Q5. What is the difference between cmp and diff commands?
Ans. Cmp is used for binary files, whereas diff is used for files in text format.
Q6. Define paging?
Ans. It is a memory management system by which a computer stores and retrieves data from secondary storage.
Q7. Which command is used to kill the last background job?
Ans. Kill $!
Q8. Define shell?
Ans. It is an environment in which we can run shell scripts, commands and programs. There are two types of shells:
- The Bourne shell
- The C shell
Q9. Which command is used to remove the seventh line from a file?
Ans. sed -i ‘7 d’ test.txt
Q10. Is UNIX open source?
Also Read>> Top Most Paying Technology Certifications!
Q11. Define hidden file?
Ans. A file starting with dot is known as hidden one.
Q12. What are links?
Ans. A link is a pointer to a file. It can be used to assign more than one name to a file, but can’t be used to assign a directory on various computers.
Q13. Which programming language is used for UNIX?
Q14. Which command is used to change the password?
Q15. Which switch is used in test expression to determine a file as a regular file?
Q16. Name some system calls used for process management?
Q17. Which command will be used to change protection mode of files beginning with the string emp and finishing with 1 or 2?
Ans. chmod u+x emp[1-3]
Q18. What is the use of tee command?
Ans. Tee command is used for sending data from the standard point.
Q19. What are directory navigation tools?
Ans. Directory navigation tools are performed on directories. For example:
Q20. How can you remove a file in UNIX?
Ans. By using rm command.
Q21. Define Kernel?
Ans. The basic center of a computer operating system, it is the kernel job to regulate to access the system hardware.
Q22. What are the main responsibilities of a shell?
- Filename and variable substitution
- Integrated programming language
- Pipeline hookup
- Input/output redirection
- Environment control
Q23. What are the five variants of Linux?
Q24. What data structures are used for Demand paging?
- Disk block descriptors
- Page table entries
- Swap-use table
- Page frame data table
These UNIX interview questions and answers will be helpful for quick look before appearing for the interview. If someone wants to improve his/her skills, take UNIX training course available online.