Unix/Linux Interview Questions and Answers

What is inode?

An inode is a unique entry which by default gets created on a disk section for a file system. It contains the following information:

Location on the disk
User of the file
Size of the file
Group of the file
Device ID
File size
Date of creation
Owner of the file

Post comment
Thanks for your comment.!
Write a comment(Click here) ...
What is relative path and absolute path?
Absolute path : Exact path from root directory. Relative path : Relative to the current path.
How to count number char, line in a file?
by using wc-stands for word count. wc -c for counting number of characters in a file. wc -l for counting lines in a file.
What is du command do?

With the help of this command you can find the disk capacity and free space of the disk.

What is the use of the command 'ls -x chapter[1-5]'?
ls stands for list; so it displays the list of the files that starts with 'chapter' with suffix '1' to '5', chapter1, chapter2, and so on.

What will the following command do?
$echo *

It is similar to 'ls' command and displays all the files in the current directory.

Which command is used to delete all files in the current directory and all its sub-directories?
rm -r *

What is the use of "grep" command?

grep (Global Regular Expression Print) is a pattern search command. It searches for the pattern, specified in the command line with appropriate option, in a given file(s).
Syntax : grep [options] pattern [files]
Example : grep 99mx mcafile

What is a pipe and give an example?
Unix commands alone are powerful, but when you combine them together, you can accomplish complex tasks with ease. The way you combine Unix commands is through using pipes and filters. The symbol | is the Unix pipe symbol that is used on the command line. What it means is that the standard output of the command to the left of the pipe gets sent as standard input of the command to the right of the pipe. However, the pipe is different because it is used to pass the output of a command to another command- example: $ cat apple.txt | wc
What is the difference between cat and more command?
"Cat" displays file contents. If the file is large the contents scroll off the screen before we view it. So command "more" is like a pager which displays the contents page by page.

How do display the 10th, 11th and 12th line of a file in Unix?

Combining the two commands head and tail can give you the result -

$ head -12 <filename> | tail -3
Ex -

$ head -12 test.txt | tail -3

What is nohup command in unix?

Nohup stands for no hang up. It is a Unix command that is used to run another command. It tells Unix not to stop passed command once it has started, that will keep running until done.
When you execute a Unix job in the background( &, bg command), and logout from the session, then that process will get killed. It can avoid this by executing the job with nohup.
Nohup prevents the command from being aborted automatically when you log out or exit the shell.

# nohup sample.sh &

By default, standard output will be redirected to nohup.out file in the current directory. You can also redirect the output to an other file using the normal shell redirection.

# nohup sh sample.sh > sample-out.log &

Once a job is started or executed using the nohup command, stdin will not be available to the user.

Latest Updates

General Knowledge of India

‘Kanchipuram’ is in which of the following states?

General Knowledge of World

In which year was Pulitzer Prize established?

Indian History

The roads of cities in the Indus Valley Civilization generally divided the city into?

Which dynasty was ruling over North India when Alexander invaded India?

Who was the Spanish navigator who set out to discover India, but instead landed on the soil of America?

Who was the Viceroy of India, when Quit India Resolution was passed in 1942?

Order Sequence

There is a queue in a ticketing office. Amanda is 10​ th​ from the front while Murthy is 25​ th from behind and Marta is just in the middle of the two. If there be 50 persons in the queue. What position does Marta occupy from the front?


A man walks 5 Km towards south and then turns to the right. After walking 3 Km he turns to the left and walks 5 Km. Now in which direction is he from the starting place?


Find the missing term: 60, 40, 55, 45, 50, 50,....?


X is a whole number. If the only common factors of X and X2 are 1 and X, then X is _______?

Ratio and Proportion

An alloy contains copper and zinc in the ratio 5 : 3 and another contains copper and tin in the ratio 8 : 5, If equal weights of the two are melted together to form a 3​ rd​ alloy, find the weight of tin per kg in the new alloy?


Aamir and Birju can cut 5000 g of wood in 20 min. Birju and Charles can cut 5000 g of wood in 40 min. Charles and Aamir can cut 5 kg of wood in 30 min. How much time Charles will take to cut 5 kg wood alone?

Compound Interest

The difference between the compound interest and the simple interest earned at the end of the third year on a sum of money at a rate of 10% per annum is Rs 77.5. What is the sum?

General Knowledge of MP

According to history, who established Gwalior?

General Knowledge of India

The headquarters of the Hindustan Aeronautics Limited is located at?

Indian Economy

The Reserve Bank of India was established in?

General Knowledge of MP

Who constructed the Chaturbhuj Temple of Orchha?

Highest peak in the Vindhya Range is the?

Latest Job Notifications

Jobs in West Bengal

इंडियन पोस्ट सर्विस Indian Post Service - 2357 पद - 19/08/2021 अंतिम तिथि - पश्चिम बंगाल पोस्टल सर्कल

Banking Jobs

भारतीय स्टेट बैंक State Bank of India(SBI) - 6100 पद - 26/07/2021 अंतिम तिथि - CRPD/APPR/2021-22/10

SSC Recruitment

कर्मचारी चयन आयोग Staff Selection Commission(SSC) - 25271 पद - 31/08/2021 अंतिम तिथि

Jobs in Madhya Pradesh

राष्ट्रीय स्वास्थ्य मिशन मध्य प्रदेश National Health Mission MP(NRHM) - 5215 पद - 22/06/2021 अंतिम तिथि

Jobs in Punjab

पंजाब स्टेट पावर कॉर्पोरेशन लिमिटेड Punjab State Power Corporation Limited (PSPCL) - 2632 पद - 20/06/2021 अंतिम तिथि

Jobs in Chhattisgarh

स्वास्थ्य सेवा निदेशालय, छत्तीसगढ़ Department of Health & Family Welfare, Chhattisgarh - 267 पद - 26/06/2021 अंतिम तिथि

Government Jobs

दिल्ली सबऑर्डिनेट सर्विस सिलेक्शन बोर्ड Delhi Subordinate Services Selection Board(DSSSB) - 5807 पद - 03/07/2021 अंतिम तिथि

Jobs in Madhya Pradesh

राष्ट्रीय स्वास्थ्य मिशन मध्य प्रदेश National Health Mission MP(NRHM) - 2850 पद - 31/05/2021 अंतिम तिथि

Government Jobs

इंडियन पोस्ट सर्विस Indian Post Service - 4368 पद - 29/05/2021 अंतिम तिथि

दिल्ली सबऑर्डिनेट सर्विस सिलेक्शन बोर्ड Delhi Subordinate Services Selection Board(DSSSB) - 7236 पद - 24/06/2021 अंतिम तिथि