Top Unix Interview Questions You Should Practice
Unix/UNICS or the UNiplexed Information Computing System is a simple, multitasking, multi-user, portable, time-sharing, and popular operating system. Unix was launched in 1969 by a group of folks at AT&T. Unix was initially programmed in assembly language and was later reprogrammed in C.
Unix OS has been ported to many machine families, more than any other operating system. This article will look at some Unix interview questions to help you ace your Unix interview!
If you are preparing for a tech interview, check out our technical interview checklist, interview questions page, and salary negotiation ebook to get interview-ready! Also, read Amazon Coding Interview Questions, Facebook Coding Interview Questions to Nail Your Next Interview, and Google Coding Interview Questions for specific insights and guidance on Coding interview preparation.
Having trained over 11,000 software engineers, we know what it takes to crack the toughest tech interviews. Our alums consistently land offers from FAANG+ companies. The highest ever offer received by an IK alum is a whopping $1.267 Million!
At IK, you get the unique opportunity to learn from expert instructors who are hiring managers and tech leads at Google, Facebook, Apple, and other top Silicon Valley tech companies.
In this article, we’ll cover:
- Top Unix Interview Questions for Beginners
- Unix Troubleshooting Interview Questions and Answers
- Unix Shell Scripting Interview Questions
- Unix Commands Interview Questions
- Unix Admin Interview Questions
- FAQs on Unix Interview Questions
Top Unix Interview Questions for Beginners
If you’re a beginner, check out these Unix interview questions to gauge your preparation level:
- Define and describe:
- A filter
- A pipe
- command substitution
- The distributions of Unix.
- Some features of Unix.
- File systems in Unix
- The core concepts of Unix
- How would you:
- list directories in Unix?
- check the date in Unix?
- log out in Unix?
- create files in Unix?
- display the contents of a file?
- calculate the number of words in a file?
- create a blank file in Unix?
- move files from one directory to another in Unix?
- copy files from one directory to another in Unix?
- remove files in Unix?
- make a new directory in Unix?
- remove the directory in Unix?
- Differentiate between multi-user and multitasking.
- What are hidden files in Unix?
- Differentiate between a single dot and a double dot in Unix.
- What does -l do when listing a directory?
- Why are directories important in a Unix system?
- Differentiate between a relative path and the absolute path.
- Describe links and symbolic links in a Unix file system.
Unix Troubleshooting Interview Questions and Answers
Here are some Unix and Unix Troubleshooting related interview questions and answers to give you an idea of what to expect:
1. What are some frequently used Unix Troubleshooting commands?
In terms of frequency of use, ifconfig, Ping, Traceroute, Netstat Command, Dig Command, Nslookup Command, Route, and Host Command are some Unix troubleshooting commands.
2. Using only one command, can we erase all files in the current directory and sub-directories?
Yes. We can use “rm –r *”, where the rm command is for deleting files. The –r option erases both directories and subdirectories, including the files. The * or asterisk represents that we need to do this for all entries.
3. List some features of the Korn Shell.
Korn Shell has a history mechanism and built-in editor that simulates vi or emacs. It also has built-in integer arithmetic and string manipulation capabilities. Lastly, it offers job control, command aliasing, and arrays.
4. What is the key difference between the –x and –v options to set?
The –x option echoes the commands post the substitution. On the other hand, the –v option echoes each command before the arguments or variables have been substituted.
5. Name some common shells and their indicators.
The indicator sh represents Bourne shell, bash represents Bourne Again Shell, csh represents C SHell, tcsh represents enhanced C Shell, zsh represents Z SHell, and ksh represents Korn SHell
Unix Shell Scripting Interview Questions
Here are some Unix shell interview questions for your Unix interview preparation:
- What is a shell?
- What is a Unix shell?
- Briefly describe Shell’s responsibilities.
- What are shell variables?
- What are the requirements before running a shell script from the terminal?
- How would you terminate a shell script if statement?
- Describe the main features of Korn Shell in detail.
- Write down some standard shells with their indicators?
- What is Bash Shell?
- What is a typical syntax when issuing commands in a shell?
- What is the standard convention when naming files in Unix?
Unix Commands Interview Questions
Getting to the more technical side, see if you can answer these Unix commands interview questions:
- Differentiate between:
- cat command and more command
- a system call, a library function, and a Unix command
- cmp command and diff command
- What command is used to:
- Restrict incoming messages?
- Kill the last background job?
- Erase all files in the current directory and all subdirectories by using only one command?
- List and describe some of the most used network commands in Unix?
- Write a command to:
- Allow a Unix system to shut down in 15 minutes, and then perform a reboot.
- Output the sorted contents of the file INPUT.TXT and place the output in another file OUTPUT.TXT while excluding duplicate entries.
- Show files in the current directory in a colored and long format.
- How does the system know where a command ends and another begins?
- Describe the usage of the tee command
Unix Admin Interview Questions
Lastly, make sure you can answer these Unix admin interview questions before your Unix interview:
- Why is it not advisable to use root as the default login?
- How do I get to admin in Linux?
- What is Unix system administration?
- What is wild-card interpretation?
- How can we switch to a superuser type from any other user type?
- What is parsing?
- What is pid?
- How can we get the present working directory in Unix?
- Explain system bootup in Unix.
- Can we see information about a process while it executes?
- Which data structure is responsible for maintaining the file identification?
- How would you:
- Change the password in Unix operating system?
- Perform a system shutdown in Unix?
- Know the information about a file?
- Change the directory in Unix?
- Determine and set the path in Unix?
FAQs on Unix Interview Questions
Q1. What is the full form of Unix?
The full form of the Unix (also called UNICS) operating system is the UNiplexed Information Computing System.
Q2. What is Unix in simple words?
Unix is a multi-user, time-sharing, portable, multitasking, popular operating system (OS). It was launched in 1969 by a group at AT&T. Compared to any other operating system, Unix has been ported to most machine families.
Q3. What is Unix used for?
Unix is used for workstations, internet servers, and mainframe computers. Unix is simple, portable (can be run on many different systems), can multitask, and has multi-user capabilities. It also has a hierarchical file system and an extensive library of software.
Q4. What are the types of standard files available in Unix?
There are seven standard Unix file types, as defined by POSIX: regular, symbolic link, directory, block special, character special, socket, and FIFO special. Different OS-specific implementations like Solaris doors do allow more types, though.
Q3. What is the who command in Unix?
The who command in Unix helps us show or print the number of users currently logged into a Unix computer system. The who command in Unix without the command-line parameter is mainly used to show the name of the users logged in currently.
Ready to Nail Your Next Coding Interview?
Whether you’re a coding engineer gunning for a software developer or software engineer role, a tech lead, or you’re targeting management positions at top companies, IK offers courses specifically designed for your needs to help you with your technical interview preparation!
If you’re looking for guidance and help with getting started, sign up for our FREE webinar. As pioneers in technical interview preparation, we have trained thousands of software engineers to crack the most challenging coding interviews and land jobs at their dream companies, such as Google, Facebook, Apple, Netflix, Amazon, and more!