Unix

Unix
Caution!!

Thursday, 19 June 2014

Unix Basics.

We would start with Unix Basics.Most of the interviewers would start with this set.

So we think if you start off well ,the journey would be pretty smooth.

  • Why production support servers use Unix OS,not  Windows or Andrios OS?
Multiuser,Multitasking,Secure,Unix deals with operations on files hence it is easy to operate.

  • What is kernel and Shell in Unix?
Kernel is the heart of Unix Operating system.It allocates time and memory to programs.It handles filestorage.

Shell act as an interface between user and the kernel.When user types a command shell translates it into a language the kernel understands and pass it to the kernel to execute.After logging in to UNIX OS,once username and password is checked for authentication the next program that runs is the shell.

  • What are  processes in unix?(Important asked in several interviews)
Each and every program that runs in unix is a process.One can view the processes running by using "ps" command.  ps -ef option gives us the detailed output.

ex:-
>ps -ef


USER       PID PPID %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND

saml      1713  1709  0 Dec10 pts/0    00:00:00 wget 


where wget=process running
1713=processid
1709=parentprocess id

  • What is a zombie process?(Important asked in several interviews)

Zombie process is a process  in which the child dies before the parent process. 
In this case only the structural information   of the process is still in the process table.

  • What is the command to find out the type of Unix operating system you are using?
>uname

  • How to find the servername from the ipaddress given?(Important asked in several interviews)
>nslookup 10.23.45.67

  • How to find the username with which you have logged in to the server?
>whoami

  • How to kill a particular process?(Important asked in several interviews)
>kill -9 1913 (where 1913 is the pid and -9 option is to forcefully kill)

  • How to find the terminal name in unix?
>tty

  • How to find out  how long the server is running?(Important asked in several interviews)
>uptime


  • Command to find out the name of the server you are currently logged in to ?
>hostname





No comments:

Post a Comment