You are on page 1of 4

1. What is UNIX?

UNIX was developed by AT & T Bell labs during 1970s. 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?

1 cd change current directory


2 cp copy file
3 mkdir make directory
4 mv move directory or file
5 rm remove files
6 rmdir removes directory
7 ls list directory
8 chmod changes the protection mode of the directory
9 grep search for the file
10 cmp compare files
5. List the UNIX Commands for File Display and printing?

1 cat shows all files of directory


2 lpr prints the file
3 head shows first few lines of file
4 tail shows last part of the file
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.

1 $ echo Hello World


2 Hello World
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.

1 $ mkdir freshersemploy
2 $ rmdir freshersemploy
Also Read Java, C, C++, Software Testing Interview Question and Answer Click
Here

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?


1 bg put suspended process to background
2 fg bring process into foreground
3 jobs list all the process
4 ^z suspends current process
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
command tail(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.

1 $ cat freshersemploy.txt
15. How to change directory?

To change the directory in UNIX, the command used is cd Below is the example:

1 $ cd freshers1 employ1
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.

1 $ cp file1 file2
18. How to print a file?

To print a file, lpr UNIX command is used. Example for printing the file is given below:
1 $ lpr file1
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.

1 $ jobs
2 $ %process1 % process2 %process3
3 $ kill %process2

You might also like