Unix interview questions

  1. What do you understand by the term filters?
  2. Define the term directory
  3. What do you understand by the term single user system?
  4. What methodology can be utilized to modify the password in UNIX?
  5. What do you understand by the term wild-card interpretation?
  6. What are the benefits of running processes in the background?
  7. Explain some of the fundamental concepts of UNIX
  8. Describe the term inode
  9. Elucidate on the different IDs used in the UNIX process.
  10. What is meant by the term nohup?
  11. Explain the terms links and symbolic links with respect to UNIX
  12. What do you understand by the term Kernel?
  13. List the different types of files that can be made available with UNIX
  14. List some of the frequent shells used in Unix along with their indicators
Unix interview questions

UNIX is an operating system that has been used by many organization for its numerous benefits. One of the greatest benefits of utilizing UNIX is its portability and ease of multi-user functionality. As UNIX has been formulated from the C language, it has become one of the hottest trends in the programming world. Many companies are in search of candidates that have well – versed knowledge in UNIX, therefore the following article provides some of the frequently asked UNIX interview questions to help you with better theoretical knowledge related to UNIX. In addition, this article also provides a list of features, pros, and cons of UNIX that will help you to perform better.

Download Unix interview questions PDF

The term “filters” is frequently used to allude to any program, which can take inputs from standard inputs, accomplish some task on that input, and compose the outcomes to standard yield. A Filter is likewise any program that can be utilized between two different projects in a pipeline.

The term directory refers to a specific type of a document that keeps up a rundown of all records in it.

Single user system refers to a computer equipped with an operating system that was intended to work by a single user at a particular given time. Single user system turns out to be progressively well known since minimal effort equipment and accessibility of wide scope of programming to perform distinction undertakings.

The following steps can be followed in order to change the password:

  • Fill the command “password”
  • Then subsequently you will receive a popup notification that will allow you to fill in your original/old/current passwords
  • In the event that the present password is confirmed. Then at that point, the terminal will invite you to enter the new password.
  • Fill the new password two times and therefore your old password will be changed and the new password will be updated.

At the point when an order line contains wild-card characters, for example, '*' or '?' these are then displaced by the shell with an arranged rundown of documents whose design coordinates the info direction. Wild-card characters are utilized to set up a rundown of documents for preparing, rather than having it determined each time during the run.

A general benefit of executing processes in the background is to get the likelihood to execute some different procedure without trusting that the past procedure will get finished. The particular symbol "&" towards the finish of the procedure advises the shell to execute the given command in the background.

Some of the fundamental concepts of UNIX include the following:

  • Commands and Utilities: Many implicit directions help the client perform everyday activities such as .mv, cat, cp, and grep and so on.
  • Directories: Every piece of information is put away in documents, and these records are put away in indexes, these catalogues consolidate to shape a tree-like structure.
  • Kernel: The kernel is otherwise called the core of the operating framework. Its crucial job is to connect with the equipment and furthermore, screen real procedures like memory the executives, document the board, and undertaking planning.
  • Shell: It is also called as the command prompt. It associates the client to the working framework, whatever is composed by the client is converted into the language comprehended by the order brief, and after that, the relating activities are performed.

An inode is a passage made on a segment of the circle put aside for a document framework. The inode contains almost all the data about a record. It incorporates the particular location on the disk where the document begins, the extent of the record, when the record was last utilized when the record was last changed, what the different read, compose and execute authorizations are, who claims the document, and other data.

The Process ID is a special number that UNIX uses to distinguish each procedure. The procedure executes to start different procedures and is known as the parent procedure and its ID is characterized as PPID (Parent Process ID).

getppid() – Is to recover PPID 

Each procedure is related to a particular client and is known as the owner of the procedure. The owner has every one of the benefits over the procedure. The owner is likewise the client who executes the procedure. The ID for a client is User ID. The procedure likewise connected with Effective User ID, which decides the entrance benefits to getting to assets like documents.

getpid() – Retrieve process id 
getuid() – Retrieve client id 
geteuid() – Retrieve powerful client id

Nohup is a distinctive command that is utilized to run the process in the background, yet it is marginally unique in relation to and which is typically utilized for putting a procedure in the background. A typical UNIX process that began with nohup will not stop regardless of whether the client has logged off from the framework. While the background process began with and will stop when the client logoff.

Another term for a document is known as a "Link". It is utilized to allocate more than one name for a record. It is not legitimate to allocate more than one name to a registry or to connect filenames on various computers. General syntax '– ln filename1 filename2'

A symbolic link is the documents that are utilized to contain just the name of different records, which are incorporated into it. Directed to the documents pointed by it is the activity of the symbolic link. General direction '– ln - s filename1 filename2'

The term "kernel" refers to a UNIX working framework, which is the supreme program that controls any computer's assets, designating them to various clients and performing diverse tasks. Nevertheless, the kernel does not perform the duty of managing a client. Rather, it begins up a different, intuitive program, called a shell, for every client when he/she signs on.

The different types of files that can be made available with UNIX include the following:

  • Character special files
  • Symbolic links
  • Regular files
  • FIFO
  • Socket
  • Block special files
  • Directory files

Some of the frequently used shells in UNIX include the following:

  • tcsh – enhanced C Shell
  • zsh – Z SHell
  • sh – Bourne shell
  • csh – C SHell
  • ksh – Korn SHell
  • bash – Bourne Again Shell
PagingSwapping
Only the required memory pages are moved to the primary memory for execution.The total procedure is moved to the principal memory for execution.
The measure of the procedure does not a make a difference of execution and it should be not exactly accessible memory estimate.To give the memory prerequisite, process estimate must be not exactly the accessible fundamental memory limit.
Allow various procedures to load to fundamental memory at the same time.The execution is simple yet is an overhead to the framework.
Memory taking care of is entirely adaptable with the assistance of paging frameworks.Memory taking care of is not progressively adaptable with swapping frameworks.