Unix / Linux Interview Questions

Dear readers, these Unix Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Unix. As per my experience good interviewers hardly plan to ask any particular question during your interview, normally questions start with some basic concept of the subject and later they continue based on further discussion and what you answer −

Shell is an interpreter. It interprets the commands and submits for execution.

Bsh, csh, ksh and bash.

It is a short cut to the file or directory. ln is the command used for the same.


It interacts with hardware and most of the tasks like memory management, tash scheduling and file management.

Login program.


Link count.

Command − logout / ctrl+d / command − exit




No, Linux is open source.

Redhat, Cent OS, Debian, Ubuntu and Fedora.


A file/directory name beginning with. (dot) is considered as hidden one.

Ken Thompson


AT & T Bell labs.

The terminal associated with the respective login.



* And ?


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 /

Having an execute permission on a directory means to have traverse permission.



A running instance of a program is called as a process.

vi − R

k, j, h and l

Yanking is the process of holding the cut or copied text into the buffer which can pasted.

:set nu

A first line in the shell script which tells which shell need to be used to execute the following commands in the shell script.


By prefixing the dollar ($) symbol for the shell variable.







Enclose the command in back quotes and assign it to a variable.

A here document is used to redirect input into an interactive shell script or program.


No, it is a convention.

sh <file>

Globally search for regular expression.


Concatenation of files text.

OS assigns an unique process identification number for the currently executing processes is called as process-id (PID).


To connect to remote UNIX/Linux machine.


To search for a file/files.



It give the process to have the privileges of the owner of the file during the instance of the program.

The process is dead but have not been removed from the process table.


It contains a program called MBR (Master boot record) which load the kernel as the part of the system booting.


echo −e “text”. Option –e places the cursor on the same line

‘diff’ shows all the differences from two file whereas ‘cmp’ shows the only the first occurring difference. The said is applicable only if differences between the files do exist.

Place the commands connected with pipes (|).

Still the current working directory would be /

It the directory through which date I/O happen on to/from a device.


ls −a


To execute a command/commands at a specific time.

Will receive the mail of the same.

LILO means linux loader, which loads the kernel into memory and starts the OS.

Double the RAM size.

ls −l|grep “^d”


grep −c “pattern” <file>

To keep the command running even after the user who issues the command has logged out.

For UNIX/Linux every device is a file and are typically located in the directory /dev.

A file is given a unique number by OS and is called as inode.




4, 2 & 1 respectively for r, w & x.

Ampersand (&)

ps −e


Shell built in commands are called as internal commands.

init s


UMASK is a Unix environment variable, which automatically sets file permissions created files.


UNIX File system.

Journal File System

Linus Torvalds

head −<n> file.txt | tail −1

while, until & for.




What is Next ?

Further you can go through your past assignments you have done with the subject and make sure you are able to speak confidently on them. If you are fresher then interviewer does not expect you will answer very complex questions, rather you have to make your basics concepts very strong.

Second 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. We at tutorialspoint wish you best luck to have a good interviewer and all the very best for your future endeavor. Cheers :-)