Wednesday 5 February 2014

Some Basic Unix Question with Answers

SOME BASIC UNIX QUESTIONS WITH ANSWERS

01.Q) What is Unix?
A) Unix is a multitasking, multi-user computer operating system. unix was developed in 1969 by a group of AT & t employees at Bell Labs.
Unix Operating System is very common in 
       - Server
       - Work Stations
       - Mobile Devices 
Unix played a key role in 
       - Development of the Internet
       - Network Computing

02.Q) Give a brief description of Linux.
A) Linux is a Unix like operating system, Originally created by Linus Torvalds. It is an Operating system that is freely distributed under the terms of GNU Public License.
Linux supports following Unix features. Such as:
       - Multiuser Support
       - Multi tasking
       - Networking
       - Support all the standard Unix utilities
       - Can compile major Unix Packages.

03.Q) What is AIX?
A) AIX is an operating system from IBM that is based on a version of UNIX.

04.Q) What is the shell?
A) Shell is the program which acts as a User Interface. It is an Intermediary between Users and Core Unix systems. It is similar to DOS in windows.

05.Q) What are different types of shell?
A) There are many Shells available in different flavors of Unix. But mostly they fall in one of 2 varieties.
Bourne Shell: First appeared in unix version 7.
C Shell: First appeared in BSD.

More common shells available are:
Korn shell: Extension of Bourne Shell
TC shell: Extension of C shell
Bourne Again shell: Extension of Bourne shell, default shell

06.Q) What is the X Window system?
A) The X Window system is the Graphical user interface of Unix. It is originally developed at MIT.
It is based on Client-Server model. the server handles input and output devices and generates the graphical displays used by the clients.

07.Q) How to login and Logout of Unix account?
A) Login: Login requires user name and password. A Unix session could be created directly on server or from a client machine. Once user name and password is validated users are presented with shell prompt to enter command.
Logout: On Command prompt enter "Exit" or "Logout" or exit the client program.

08.Q) What is vi editor?
A) The vi editor is a screen editor which is available on almost all Unix systems. Once you have learned vi, you will find that it is a fast and powerful editor. vi has no menus but instead uses combinations of keystrokes in order to accomplish commands.

09.Q) What is disk quota?
A) A Disk quota is the amount of space allotted to each user for file storage on a given computer.
On shared systems such as Unix, every user has a maximum disk quota. This prevents any individual from using more than his or her fair share of disk space.

10.Q) What is a daemon in Unix?
A) Daemon stands disk and execution monitor. A daemon is a long running background process that answers request for services.
The term originated with Unix, but most operating systems use daemons in some form or another. In Windows daemons are called "services". In unix the names of daemons conventionally end in "d". Some examples include inetd, httpd, nfsd, sshd, named and lpd.

11.Q) What is a group?
A) As the name suggests, Group is a logical collection of users. it is used to manage the access rights of different files and directories to users.
A user can be part of multiple groups and there is no relationships between groups.

12.Q) Give some of the file related commands in Unix?
A) ls: List file
      more: Show file contents
      cat: Show file contents
      mv: Move a file
      cp: Copies file
      rm: removes a file
      diff: compare files
      wc: gives information like line, word and characters
      chmod: changes permission of file
      vi: Editing file
      gzip: File Compression
      lpr: Print

13.Q) Give some of the Directory related commands in Unix?
A) Some of the directory related commands are:
        mkdir: make a new directory
        cd: change (go to directory)
        pwd: present working directory

14.Q) Give some of the search related commands in Unix.
A) Some of the search commands are 
        ff: find files
        grep: looks for strings in files

15.Q) Give some of the connection commands in unix.
A) Common connection commands are:
       nn:: use it to read news
       rlogin: connect to remote host
       telnet: connect to remote host
       ftp: move files to or from remote host
       lynx: browse web

16.Q) Give some of the Self management commands in Unix?
A) Self-management commands
          whoami: returns your user name
          passwd: manage password.
          ps -u: list processes
          kill PID: kills process with give id
          quota: Shows disk quota
          du: disk usage of file or directory
          last: list last login Information