Friday 30 October 2015

UNIX Interview Questions and Answers

Unix is one of most powerful multi-tasking and multi-user operating system. Unix commands and interview question and answers are explained below. All the basic UNIX commands are listed with it operation and functionality. These are the basic interview question most commonly asked in interview for fresher as well as experienced.
1. What is UNIX?
UNIX was developed by AT & T Bell labs during 1970’s. UNIX is multi-user, multi-tasking operating system. UNIX uses Shell as a commands for interface between users and machine.
2. What is Shell?
Shell is used for interaction between user and operating system. By using shell, users can typed commands for their task and
3. What is the different between multi-user and multi-tasking?
Multi-user means, there can be more than one user profile in the operation system whereas multi-tasking means, operating system can performs multiple operations at a time.
4. What are the basic UNIX commands for File and Directory Management?
5. List the UNIX Commands for File Display and printing?
 6. What is kernel?
Kernel is the essential parts which act as mediator for computer hardware and software input and output requests and it also handle memory managements.
7. Who is Super user?
Super users is the administrative in the operating system account which has all the authority i.e. can add user, remove them, set files inaccessible to other users and so on and super users are called as system administration.
8. Write Hello World program by using UNIX command?
The Hello World can be display in the command line by using echo command.
 9. What is chmod command?
chmod command in UNIX changes the file protection mode of the directory.
10. How to create and remove directory?
Perform the following commands for creating and removing directory in UNIX, mkdirand rmdir are used.
11. How to display time?
By using date command, we can display the time and date in unix.
12. List some of the process control commands?
 13. How to display first and last part of the file?
The first part of the file can be displayed by using head(which shows few lines from starting of the file) whereas the last part of the file can be display with UNIX commandtail(which display last few line of the file).
14. How to read a file in UNIX?
The command used for reading the file in UNIX is cat. Example is shown below.
 15. How to change directory?
To change the directory in UNIX, the command used is cd Below is the example:
 16. In UNIX, how to search for a file?
grep is the UNIX command used for searching files.
17. Which UNIX command is used for copying files?
The command used for copying files is cp. The example is given below.
 18. How to print a file?
To print a file, lpr UNIX command is used. Example for printing the file is given below:
19.  Explain Process in UNIX?
A process is an executing programs which may be run in background, foreground and the process can be suspended. Process is identified by a unique PID i.e. Process Identifier.
20. How to list and kill the background process in UNIX?
To display list all the process running either in background, foreground or suspended, use jobs command. To terminate a certain process, kill command is used.

No comments:

Post a Comment