Sie sind auf Seite 1von 116

Anyway, the list has been made public, so enjoy:

1. Give an example of set of shell commands that will give you the number of files in a directory
2. ow do you tell what process has a !"# port open in $inux
%. &n a 'ed at $inux (ariant how do you control whether a service starts when the system
boots
). ow do you tell the amount of free dis* space left on a volume
+. Give an example of a set of shell commands to tell how many times ,-./012bob,-./03 has
logged on to the system this month
4. Give an example of a recursively copying a directory from one location to another.
5. ow do you modify the 6# and 7et mas* of a system running a 'ed at (ariant of $inux
8. Give an example of a set of shell commands that will give you the number of ,-./012httpd,
-./03 processes running on a $inux box.
9. &n "ent&: or ;edora based system using the pac*age management application, how do you
tell what pac*age provided the file ,-./012libnss<ldap.so,-./03
1=. >hat is the difference between (!# client, server, and transparent
11. >hat is the maximum length of "A!4
12. ow does one set up a layer two lin* to share ($A7s
1%. ow does one implement redundant lin*s at $ayer 2
1). >hat is the difference between a hub, switch, and a router? >hat are the security advantages
of switch vs. hub?
1+. :how an example of using telnet to learn the headers of an http server.
14. 6n what &:6 layer does ### exist
15. >hat@s the difference between !"# and AB#
18. Given a B7: server that has just started Cwith an empty cacheD and host contacting this B7:
server Cusing it@s &: settingD to learn an address for google.com, list the steps the B7: server
will ta*e to learn it with 6# addresses Ceach step will have multiple possible 6# addresses ,
-./0.EF you need choose only one per stepD.
19. >hy are layer 2 loops bad, and what protocol was designed to prevent them
2=. Given a radius server at 1=.=.=.2 and a shared *ey of ,-./0GFabc12%H show the 6&:
commands necessary to authenticate switch users against the radius server, while still allowing
the use of local username I password pairs
1. >hich account is created on $inux installation?
- With the instaIIation of Linux, a super user account is created caIIed as root.
2. >hich daemon trac*s events on your system?
- The sysIogd daemon tracks the system information and saves it to specified Iog
fiIes.
%. >hich command would you use if you want to remove the password assigned to a group?
- gpasswd - r removes the password from the group.
- Here, the gpasswd changes the password of the group and when it is
accompanied by -r, the password gets removed.
). Jou wish to print a file Kdraft@ with 4= lines to a page. >hat command would you use?
- The command that I wouId use is: pr -I60 draft
- The defauIt page Iength when using pr is 66 Iines.
- The -I option specifies a different Iength.
Test your Iinux knowIedge with our muItipIe choice questions!
Linux part 1 (27 questions)
Linux part 2 (25 questions)
Linux part 3 (25 questions)
DownIoad Linux interview questions and answers
+. >hich file would you examine to determine the levels of messages written to system log
files?
- kerneI.h
4. Jou are logged on as a regular user. >ithout logging off and logging on as root, you are
reLuired to create a new user account immediately. ow would you do it?
- This can be achieved by issuing the su command.
- This wiII prompt you for the password of the root account.
- Providing the password, Iogs you in as root. Now, you can perform any
administrative duties. .
5. Jou are reLuired to restore the file memo.ben. 6t was bac*ed up in the tar file
MyNac*up.tar. >hich command would you use to do it?
- The command that we wouId use is: tar xf MyBackup.tar memo.ben
- It uses the x switch to extract a fiIe.
8. >hat is partial bac*up?
- When you seIect onIy a portion of your fiIe hierarchy or a singIe partition to back
up, it is caIIed partiaI back up.
9. >hat is the fastest way to enter a series of commands from the commandOline?
- Write the commands, each separated by a semi-coIon. Press enter after the Iast
command.
- The semi-coIon wouId inform the sheII that muItipIe commands are being entered
at the command Iine, to be executed seriaIIy.
1=. >hat are the Lualities of soft lin*s?
a.) Soft Iink fiIes have different inode numbers than source fiIe
b.) The soft Iink fiIe wiII be of no use if originaI fiIe is deIeted.
c.) Soft Iinks are not updated
d.) They can create Iinks between directories
e.) They can cross fiIe system boundaries
11. Bifferentiate between "ron and Anacron.
a.) Minimum granuIarity with Cron is minute whiIe it is in days with Anacron.
b.) Cron job can be scheduIed by any normaI user whiIe Anacron can be scheduIed
onIy by the super user.
c.) Cron expects the system to be up and running whiIe the Anacron doesnt expect
the system to be up and running aII the time. In case of anacron if a job is
scheduIed and the system is down that time, it wiII execute the job as soon as the
system is up and running.
d.) Cron is ideaI for servers whiIe Anacron is ideaI for desktops and Iaptops.
e. ) Cron shouId be used when you want a job to be executed at a particuIar hour
and minute whiIe Anacron shouId be used in when the job can be executed
irrespective of the hour and minute.
12.D >hat is an 67&BP?
- It is a structure which has the description of aII the fiIes and pointers to the data
bIocks of fiIe stored in it.
- The information contained is fiIe-size, access and modification time, permission
and so on.
1%. >hich command is used to chec* the number of files and dis* space used and the each
user@s defined Luota?
repquota command is used to check the status of the users quota aIong with the
disk space and number of fiIes used. This command gives a summary of the users
quota that how much space and fiIes are Ieft for the user. Every user has a defined
quota in Linux. This is done mainIy for the security, as some users have onIy Iimited
access to fiIes. This provides a security to the fiIes from unwanted access. The
quota can be given to a singIe user or to a group of users.
1). >hat is the name and path of the main system log?
By defauIt the main system Iog is /var/Iog/messages. This fiIe contains aII the
messages and the script written by the user. By defauIt aII scripts are saved in this
fiIe. This is the standard system Iog fiIe, which contains messages from aII system
software, non-kerneI boot issues, and messages that go to 'dmesg'. dmesg is a
system fiIe that is written upon system boot.
14. ow secured is $inux? Pxplain.
Security is the most important aspect of an operating system. Due to its unique
authentication moduIe, Linux is considered as more secured than other operating
systems. Linux consists of PAM. PAM is PIuggabIe Authentication ModuIes. It
provides a Iayer between appIications and actuaI authentication mechanism. It is a
Iibrary of IoadabIe moduIes which are caIIed by the appIication for authentication. It
aIso aIIows the administrator to controI when a user can Iog in. AII PAM
appIications are configured in the directory "/etc/pam.d" or in a fiIe "/etc/pam.conf".
PAM is controIIed using the configuration fiIe or the configuration directory.
15. "an $inux computer be made a router so that several machines may share a single
6nternet connection? ow?
Yes a Linux machine can be made a router. This is caIIed "IP Masquerade." IP
Masquerade is a networking function in Linux simiIar to the one-to-many (1: Many)
NAT (Network Address TransIation) servers found in many commerciaI firewaIIs and
network routers. The IP Masquerade feature aIIows other "internaI" computers
connected to this Linux box (via PPP, Ethernet, etc.) to aIso reach the Internet as
weII. Linux IP Masquerading aIIows this functionaIity even if the internaI computers
do not have IP addresses.
The IP masquerading can be done by the foIIowing steps:
1. The Linux PC must have an internet connection and a connection to LAN.
TypicaIIy, the Linux PC has two network interfaces-an Ethernet card for the LAN and
a diaI-up PPP connection to the Internet (through an ISP).
2. AII other systems on your LAN use the Linux PC as the defauIt gateway for
TCP/IP networking. Use the same ISP-provided DNS addresses on aII systems.
3. EnabIe IP forwarding in the kerneI. By defauIt the IP forwarding is not enabIed. To
ensure that IP forwarding is enabIed when you reboot your system, pIace this
command in the /etc/rc.d/rc.IocaI fiIe.
4. Run /sbin/iptabIes-the IP packet fiIter administration program-to set up the ruIes
that enabIe the Linux PC to masquerade for your LAN.
18. >hat is the minimum number of partitions you need to install $inux?
Minimum 2 partitions are needed for instaIIing Linux. The one is / or root which
contains aII the fiIes and the other is swap. Linux fiIe system is function specific
which means that fiIes and foIders are organized according to their functionaIity.
For exampIe, aII executabIes are in one foIder, aII devices in another, aII Iibraries in
another and so on. / or root is the base of this fiIe system. AII the other foIders are
under this one. / can be consider as C: .Swap is a partition that wiII be used as
virtuaI memory. If there is no more avaiIabIe RAM a Linux computer wiII use an area
of the hard disk, caIIed swap, to temporariIy store data. In other words it is a way of
expanding your computers RAM.
19. >hich command is used to review boot messages?
dmesg command is used to review boot messages. This command wiII dispIay
system messages contained in the kerneI ring buffer. We can use this command
immediateIy after booting to see boot messages. A ring buffer is a buffer of fixed
size for which any new data added to it overwrites the oIdest data in it. Its basic
syntax is
dmesg [options]
Invoking dmesg without any of its options causes it to write aII the kerneI messages
to standard output. This usuaIIy produces far too many Iines to fit into the dispIay
screen aII at once, and thus onIy the finaI messages are visibIe. However, the output
can be redirected to the Iess command through the use of a pipe, thereby aIIowing
the startup messages to be viewed on one screen at a time
dmesg | Iess
2=. >hich utility is used to ma*e automate rotation of a log?
Iogrotate command is used to make automate rotation of Iog.
Syntax of the command is:
Iogrotate [-dv] [-f|] [-s|] config_fiIe+
It aIIows automatic rotation, compression, removaI, and maiIing of Iog fiIes. This
command is mainIy used for rotating and compressing Iog fiIes. This job is done
every day when a Iog fiIe becomes too Iarge. This command can aIso be run by
giving on command Iine. We can done force rotation by giving -f option with this
command in command Iine. This command is aIso used for maiIing. We can give -m
option for maiIing with this command. This option takes two arguments one is
subject and other is recipient name.
21. >hat are the partitions created on the mail server hard drive?
The main partitions are done firstIy which are root, swap and boot partition. But for
the maiI server three different partitions are aIso done which are as foIIows:
1. /var/spooI- This is done so that if something goes wrong with the maiI server or
spooI than the output cannot overrun the fiIe system.
2. /tmp- putting this on its own partition prevents any user item or software from
overrunning the system fiIes.
3. /home- putting this on its own is usefuI for system upgrades or reinstaIIs. It aIIow
not to wipe off the /home hierarchy aIong with other areas.
22. >hat are the fields in theIetcIpasswd file?
It contains aII the information of the users who Iog into the system. It contains a Iist
of the system's accounts, giving for each account some usefuI information Iike user
ID, group ID, home directory, sheII, etc. It shouId have generaI read permission as
many utiIities, Iike Is use it to map user IDs to user names, but write access onIy for
the superuser (root). The main fieIds of /etc/passwd fiIe are:
1. Username: It is used when user Iogs in. It shouId be between 1 and 32 characters
in Iength.
2. Password: An x character indicates that encrypted password is stored in
/etc/shadow fiIe.
3. User ID (UID): Each user must be assigned a user ID (UID). UID 0 (zero) is
reserved for root and UIDs 1-99 are reserved for other predefined accounts. Further
UID 100-999 are reserved by system for administrative and system
accounts/groups.
4. Group ID (GID): The primary group ID (stored in /etc/group fiIe)
5. User ID Info: The comment fieId. It aIIow you to add extra information about the
users such as user's fuII name, phone number etc. This fieId use by finger
command.
6. Home directory: The absoIute path to the directory the user wiII be in when they
Iog in. If this directory does not exists then users directory becomes /
7. Command/sheII: The absoIute path of a command or sheII (/bin/bash). TypicaIIy,
this is a sheII.
2%. >hich commands are used to set a processorOintensive job to use less "#A time?
nice command is used for changing priority of the jobs.
Syntax: nice [OPTION] [COMMAND [ARG]...]
Range of priority goes from -20 (highest priority) to 19 (Iowest).Priority is given to a
job so that the most important job is executed first by the kerneI and then the other
Ieast important jobs. This takes Iess CPU times as the jobs are scheduIed and are
given priorities so the CPU executes fast. The priority is given by numbers Iike -20
describe the highest priority and 19 describe the Ieast priority.
2). ow to change window manager by editing your home directory?
/.xinitrc fiIe aIIows changing the window manager we want to use when Iogging into
X from that account. The dot in the fiIe name shows you that the fiIe is a hidden fiIe
and doesn't show when you do a normaI directory Iisting. For setting a window
manager we have to save a command in this fiIe. The syntax of command is: exec
windowmanager.After this, save the fiIe. Next time when you run a startx a new
window manager wiII open and become defauIt. The commands for starting some
popuIar window managers and desktop environments are:
-KDE = startkde
-Gnome = gnome-session
-BIackbox = bIackbox
-FVWM = fvwm
-Window Maker = wmaker
-IceWM = icewm
2+. ow documentation of an application is stored?
When a new appIication is instaIIed its documentation is aIso instaIIed. This
documentation is stored under the directory named for appIication. For exampIe if
my appIication name is App1 then the path of the documentation wiII be
/user/doc/App1. It contains aII the information about the appIication. It contains date
of creating appIication, name of appIication and other important moduIe of the
appIication. We can get the basic information of appIication from the
documentation.
24. ow shadow passwords are given?
pwconv command is used for giving shadow passwords. Shadow passwords are
given for better system security. The pwconv command creates the fiIe /etc/shadow
and changes aII passwords to x in the /etc/passwd fiIe. First, entries in the
shadowed fiIe which don't exist in the main fiIe are removed. Then, shadowed
entries which don't have `x' as the password in the main fiIe are updated. Any
missing shadowed entries are added. FinaIIy, passwords in the main fiIe are
repIaced with `x'. These programs can be used for initiaI conversion as weII to
update the shadowed fiIe if the main fiIe is edited by hand.
25. ow do you create a new user account?
useradd command is used for creating a new user account. When invoked without
the
-D option, the useradd command creates a new user account using the vaIues
specified on the command Iine and the defauIt vaIues from the system. The new
user account wiII be entered into the system fiIes as needed, and initiaI fiIes copied,
depending on the command Iine options. This command uses the system defauIt as
home directory. If -m option is given then the home directory is made.
28. >hich password pac*age is installed for the security of central password?
Shadow password packages are used for security of centraI passwords. Security is
the most important aspect of every operating system. When this package is not
instaIIed the user information incIuding passwords is stored in the /etc/passwd fiIe.
The password is stored in an encoded format. These encoded forms can be easiIy
identified by the System crackers by randomIy encoding the passwords from
dictionaries. The Shadow Package soIves the probIem by reIocating the passwords
to another fiIe (usuaIIy /etc/shadow). The /etc/shadow fiIe is set so that it cannot be
read by just anyone. OnIy root wiII be abIe to read and write to the /etc/shadow fiIe.
29. >hich shell do you assign to a #&#% mailOonly account?
POP3 maiI onIy account is assigned to the /bin/faIse sheII. However, assigning bash
sheII to a POP3 maiI onIy gives user Iogin access, which is avoided. /bin/noIogin
can aIso be used. This sheII is provided to the user when we dont want to give
sheII access to the user. The user cannot access the sheII and it reject sheII Iogin
on the server Iike on teInet. It is mainIy for the security of the sheIIs. POP3 is
basicaIIy used for downIoading maiI to maiI program. So for iIIegaI downIoading of
emaiIs on the sheII this account is assigned to the /bin/faIse sheII or /bin/noIogin.
These both sheIIs are same they both do the same work of rejecting the user Iogin
to the sheII. The main difference between these two sheIIs is that faIse sheII shows
the incorrect code and any unusuaI coding when user Iogin with it. But the noIogin
sheII simpIy teIIs that no such account is avaiIabIe. So noIogin sheII is used mostIy
in Linux.
%=. >hich daemon is responsible for trac*ing events on $inux system?
sysIogd is responsibIe for tracking system information and save it to the desired
Iog fiIes. It provides two system utiIities which provide system Iogging and kerneI
message trapping. Internet and UNIX domain sockets support enabIe this utiIity
package to support both IocaI and remote Iogging. Every Iogged message contains
at Ieast a time and a hostname fieId, normaIIy a program name fieId, too. So to track
these information this daemon is used. sysIogd mainIy reacts to the set of signaIs
given by the user. These are the signaIs given to sysIogd: SIGHUP: This Iets
sysIogd perform a re-initiaIization. AII open fiIes are cIosed, the configuration fiIe
(defauIt is /etc/sysIog.conf) wiII be reread and the sysIog faciIity is started again.
SIGTERM: The sysIogd wiII die. SIGINT, SIGQUIT: If debugging is enabIed these are
ignored, otherwise sysIogd wiII die. SIGUSR1: Switch debugging on/off. This option
can onIy be used if sysIogd is started with the - d debug option. SIGCHLD: Wait for
ChiIds if some were born, because of waiting messages.
%1. >hich daemon is used for scheduling of the commands?
The crontab command is used for scheduIing of the commands to run at a Iater
time. SYNTAX
crontab [ -u user ] fiIe
crontab [ -u user ] { -I | -r | -e }
Options
-I List - dispIay the current crontab entries.
-r Remove the current crontab.
-e Edit the current crontab using the editor specified by the VISUAL or EDITOR
environment variabIes.
When user exits from the editor, the modified crontab wiII be instaIIed automaticaIIy.
Each user can have their own crontab, and though these are fiIes in /var, they are
not intended to be edited directIy. If the -u option is given than the crontab gives
the name of the user whose crontab is to be tweaked. If it is given without this then
it wiII dispIay the crontab of the user who is executing the command.
%2. ow environment variable is set so that the file permission can be automatically set to the
newly created files?
umask command is used to set fiIe permission on newIy created fiIes automaticaIIy.
Syntax
umask [-p] [-S] [mode]
It is represented in octaI numbers. We can simpIy use this command without
arguments to see the current fiIe permissions. To change the permissions, mode is
given in the arguments. The defauIt umask used for normaI user is 0002. The
defauIt umask for the root user is 0022. For caIcuIating the originaI vaIues, the
vaIues shown by the umask must be subtracted by the defauIt vaIues. It is mainIy
used for masking of the fiIe and directory permission. The /etc/profiIe script is
where the umask command is usuaIIy set for aII users. The -S option can be used
to see the current defauIt permissions dispIayed in the aIpha symboIic format.
For exampIe, umask 022 ensures that new fiIes wiII have at most 755 permissions
(777 NAND 022).
The permissions can be caIcuIated by taking the NAND of originaI vaIue with the
defauIt vaIues of fiIes and directories
1. !here are multiple shell types of unix. >hat are the features of the Nourne and Qorn shell?
!he Nourne shell is the standard shell of unix , it provides the following fewatures:
O 6t gives the ability of inputIoutput redirection.
O Allows the usage of metacharacters for file name abbreviations.
O !he environment can be customiRed using the shell variables.
O 6t provides the user with a built in command set for the creation of shell programs.
O Allows the user to control a job.
!he Qorn shell is an extension of the Nourne shell which is bac*ward compatible. !he feature uniLue
to the Qorn shell are as follows:
O Allows the user to do command line editing.
O 6t maintains a command history, which enables the user to chec* the last commands executed.
O !here is a provision for integer arithmetic.
O #rovides the support for arrays and arithmetic expressions.
O Give the user the option to use aliases which is used to abbreviate the command name.
$inux test part 1 C25 LuestionsD
$inux test part 2 C2+ LuestionsD
$inux test part % C2+ LuestionsD
2. >hat do you understand by ;ile modes in unix?
Anix enables the user to set the desired level of privacy. 6t allows the user to set the access
permission of the file. !his is *now as the file mode of a file.
!he file permissions of file are displayed in the form :
drwxrwxrw filename date time
!he letters r means read , w means write and x means execute. >hen the permission of a file is set
by the user it is necessary to classify the users into three categories:
owner: the user who creates the file.
group: other users having the same permissions as the group owner.
other: all other user.
6n the text drwxrwxrw the d letter signifies the directory.;ollowing the d letter the next three letters
specify the permissions of the owner. the next three specify the permissions of the group. !he last
three characters specify the permissions of the other users.
%. >hat is the alias mechanism in A76S?
!he alias command allows the user to specify or assign another name to a command. 6t can be also
used to club together a group of commands.
;or ex.
alias dir Kls Os;"@
!he above command on being executed would tell the shell that dir is another name for the command
ls Os;". 6n this way the user can simply assign an alias name to a command that could be difficult to
remember. 7ow the user simply needs to use the specified alias name as given by him in place of the
command for the same effect as the code. !he user can chec* the number of aliases active by typing
in the command from the shell:
uhunixT alias pwdls KpwdU ls Os;"@
). >hat are the different ways of redirecting 6I&?
Anix allows the user to redirect the output of an operation instead of sending it to your screen. !he
user has to ma*e used of the redirection pointer CV W VVD. !he various ways of redirecting the output
are as follows:
O !o copy the contents of one file to another:
uhunixT cat file1 V file2
O !o concatenate multiple files:
uhunixT cat file1 file2 file% V newfile
O !o append a file to another file:
uhunixT cat bottomfile VV appendeefile
O !o redirect the input from instead of the *eyboard to a file:
uhunixT mail username X letterfile
+. >hat are the use of pipes in unix?
#iping in unix allows the user to set the output of a specific operation as input to another. !he piping
of output from one file to another is performed by using the Y symbol.
;or ex.
uhunixT w Y grep username
!his command would allow the user to chec* if the specified user is logged in or not. >hen pipes are
used in combination with redirection it gives the user the powerful ability to manipulate long
operations in short steps.
;or ex.
uhunixT ls Y grep vi V vi.files
!his command would result in the creation of a vi.files which would consist of the names of all the
files in the current directory with a vi in their names.
#art 1 #art 2 #art % #art ) #art +
More Unix interview questions
What is Linux and why is it so popuIar?
Answer - $inux is an operating system that uses A76S li*e &perating system.......
What is LILO?
Answer - $6$& is $inux $oader is a boot loader for $inux. 6t is used to load $inux into the memory and
start the &perating system.......
What is the difference between home directory and working directory?
Answer - ome directory is the default wor*ing directory when a user logs in. &n the other hand,
wor*ing directory is the user@s current directory.......
What is the difference between internaI and externaI commands?
Answer - 6nternal commands are commands that are already loaded in the system. !hey can be
executed any time and are independent.......
ExpIain the difference between a static Iibrary and a dynamic Iibrary?
Answer - Static libraries are loaded when the program is compiled and dynamically-linked libraries are loaded
in while......
Write your comment - Share Knowledge and Experience
Discussion Board
OfbnFwABeySXxiuem
4NwyN tnfddeambyLe
x*instj 1=O1%O2=12 =2:11 AM
Unix interview questions and answers
How to manage muItipIe connections?
Jou can use selectCD or pollCD functions to manage your multiple connections. !hese functions somewhat has
the same functionality but they are Luite different in their approach. !hese processes examine a set of file
descriptor to see specific event, if they are pending then they wait for a specific time for that event to get
completed. !hese are useful when used for soc*ets, pipes,ptys,ttys and other character devices.
How can muItipIe processes write to the pipe simuItaneousIy?
Multiple processes can be written to pipe simultaneously by the use of #6#P<NA;. !he conditions which have
to be noted down is that, if the data to be written to the pipe is less than #6#P<NA; then, the data won@t be
interleaved. !he read call at the same time will return all the data present, even from the multiple writes.
#6#P<NA; siRe is at least +12QN. 6t is defined in 2Xlimits.hV.
What are pttys?
#ttys are also called as #seudoOteletypes, these are pseudoOdevices that consist of two parts, which are as
follows: 1st is the master side, which can be considered as 2userZ and 2nd is the slave side, which acts li*e
standard tty device. !hey allow means to emulate the behavior of serial terminal using the control of the
program. Pxample of this is as follows: telnet uses pseudo terminal on remote system.
'ohit :harma 12O14O2=11 =%:25 AM
Unix interview questions and answers
What's the difference between fork() and vfork()?
for*CD and vfor*CD both are system calls, but there are some differences between both of them and these
differences are as follows:
O vfor*CD is the lowerOoverhead version of for*CD. for*CD is the original system call.
O for*CD is used to copy the entire address space of the process whereas, vfor*CD is used to increase the
functionality of for*CD.
Where shouId I put my configuration fiIes in UNIX?
A76S has a separate place to *eep all the configuration files at one place. !here are several directories
according to the A76S version you might be using. !he directories are: 2IvarIoptI#A"QAGPZ, 2IusrIlocalIlibZ,
2IusrIlocalIetcZ.
AserOspecific configuration files are usually hidden, this is represented by a C.D before the file name, for
example 2.abcZ. AserOspecific configuration file usually resides under [&MP.
What is a zombie?
A child process is called as 2RombieZ when a child process gets terminated and the parent process tries to call
waitCD on the child process. !he status of it can be seen by 2psZ command, a 2\Z will be written in the process
status field. 6n this case the child process will be ta*ing the entry in the process table. :o, Rombie is a situation
in which the child finishes its process before its parent.
'ohit :harma 12O14O2=11 =%:24 AM
Unix interview questions and answers
How do I remove a fiIe whose name begins with a "-"?
;ilename should not be saved with a 2OZ in the beginning. !he only possible way to remove such files is, by
using the command of rm and the syntax of it is as follows:
rm .I 2OZfilename Cfile is in the current directoryD
!his is the remove command which is used to remove either the file or the directory.
What to do with the fiIe if it consists of a '/' in fiIename?
!he file which consists of a KI@ in filename is treated as special case and can be created by faulty *ernel code.
6n most of the cases ]I] and ]^=] are the only two characters that cannot appear in a filename. !he special
symbol ]I] is used to separate directories and files. !he commands ]find] or ]rm] will find and delete this file as
they treat the symbol in normal way.
Why do I get error message, when I use "rsh host command"?
!he program 2rshZ stands for remote shell program. >hen the remote account uses the " shell, then the shell
executes the command for you. :hell reads your remote 2.cshrcZ file which might contain other commands
such as sty, biff that is not appropriate to be used with the shell. Bue to this unexpected error message occurs.
;or example:
stty erase _ IIcommands in .cshrc file.
biff y
II when the shell interprets it, then it gives error message li*e
T rsh someOmachine date
stty: : "an]t assign reLuested address
>here are you?
How do I set an environment variabIe to change my directory inside a program?
!he environment variable can@t be set as it is not allowed and special permissions are reLuired to ma*e any
changes. >henever a process gets created, then other processes which are the subOprocess of the parent
process also called as child process inherits a copy of its parent@s variable. "hild process can change the
values but it will have no affect on the parent shell. ;or allowing your parent shell to change its variables,
when you change the variable in child shell, then you will be reLuired to ta*e permission from parent shell to
give special privileges for any change.
Neginners A76S 6nterview `uestions Answers
1. Write command to Iist aII the Iinks from a directory?
6n this A76S command interview Luestions interviewer is generally chec*ing whether user *nows basic use of alsa agrepa and regular expression etc
Jou can write command li*e:
ls Olrt Y grep a_la
2. Create a read-onIy fiIe in your home directory?
!his is a simple A76S command interview Luestions where you need to create a file and change its parameter to readOonly by using chmod command
you can also change your umas* to create read only file.
touch file
chmod )== file
read more about fiIe and directory permission in unix and Iinux here.
3. How wiII you find which operating system your system is running on in UNIX?
Ny using command "uname -a" in A76S
4. How wiII you run a process in background? How wiII you bring that into foreground and how wiII you kiII that process?
;or running a process in bac*ground use aWa in command line. ;or bringing it bac* in foreground use command afg jobid" and for getting job id you use
command ajobsa, for *illing that process find #6B and use *ill O9 #6B command. !his is indeed a good Anix "ommand interview Luestions because many
of programmer not familiar with bac*ground process in A76S.
5. How do you know if a remote host is aIive or not?
Jou can chec* these by using either ping or teInet command in A76S. !his Luestion is most as*ed in various Anix command 6nterview because its most
basic networ*ing test anybody wants to do it.
6. How do you see command Iine history in UNIX?
(ery useful indeed, use history command along with grep command in unix to find any relevant command you have already executed. #urpose of this
Anix "ommand 6nterview `uestions is probably to chec* how familiar candidate is from available tools in A76S operation system.
7. How do you copy fiIe from one host to other?
Many options but you can say by using ascpa command. Jou can also use rsync command to answer this A76S interview Luestion or even sftp would
be o*.
8. How do you find which process is taking how much CPU?
Ny using atopa command in A76S, there could be multiple followOup A76S command interview Luestions based upon response of this because 2!&#Z
command has various interactive options to sort result based upon various parameter.
9. How do you check how much space Ieft in current drive ?
Ny using "df" command in A76S. ;or example "df -h ." will list how full your current drive is. !his is part of anyone day to day activity so 6 thin* this Anix
6nterview Luestion will be to chec* anyone who claims to wor*ing in A76S but not really wor*ing on it.
10. What is the difference between Swapping and Paging?
:wapping:
>hole process is moved from the swap device to the main memory for execution. #rocess siRe must be less than or eLual to the available main
memory. 6t is easier to implementation and overhead to the system. :wapping systems does not handle the memory more flexibly as compared to the
paging systems.
#aging:
&nly the reLuired memory pages are moved to main memory from the swap device for execution. #rocess siRe does not matter. Gives the concept of the
virtual memory. 6t provides greater flexibility in mapping the virtual address space into the physical memory of the machine. Allows more number of
processes to fit in the main memory simultaneously. Allows the greater process siRe than the available physical memory. Bemand paging systems
handle the memory more flexibly.
6ntermediate A76S 6nterview `uestions Answers
1. What is difference between ps -ef and ps -auxwww?
!his is indeed a good Anix 6nterview "ommand `uestion and 6 have faced this issue while
ago where one culprit process was not visible by execute ps -ef command and we are wondering which process is holding the file.
ps Oef will omit process with very long command line while ps Oauxwww will list those process as well.
2. How do you find how many cpu are in your system and there detaiIs?
Ny loo*ing into file IetcIcpuinfo for example you can use below command:
cat /proc/cpuinfo
3. What is difference between HardLink and SoftLink in UNIX?
6 have discussed this Anix "ommand 6nterview Luestions in my blog post difference between :oft lin* and ard lin* in Anix
4. What is Zombie process in UNIX? How do you find Zombie process in UNIX?
>hen a program for*s and the child finishes before the parent, the *ernel still *eeps some of its information about the child in case the parent might
need it O for example, the parent may need to chec* the child]s exit status. !o be able to get this information, the parent calls ]waitCD]U 6n the interval
between the child terminating and the parent calling ]waitCD], the child is said to be a ]Rombie] C6f you do ]ps], the child will have a ]\] in its status field to
indicate this.D
Zombie : The process is dead but have not been removed from the process tabIe.
5. What is "chmod" command? What do you understand by this Iine "r-- -w- --x?
6. There is a fiIe some where in your system which contains word "UnixCommandInterviewQuestions" How wiII find that fiIe in Unix?
Ny using find command in A76S for details see here 1= example of using find command in Anix
7. In a fiIe word UNIX is appearing many times? How wiII you count number?
grep Oc aAnixa filename
8. How do you set environment variabIe which wiII be accessibIe form sub sheII?
Ny using export for example export countb1 will be available on all sub shell.
9. How do you check if a particuIar process is Iistening on a particuIar port on remote host?
Ny using telnet command for example 2telnet hostname portZ, if it able to successfully connect then some process is listening on that port. !o read more
about telnet read networ*ing command in A76S
10. How do you find whether your system is 32 bit or 64 bit ?
Pither by using "uname -a" command or by using aarcha command.
Advanced A76S 6nterview `uestions and Answers
1. How do you find which processes are using a particuIar fiIe?
Ny using Isof command in A76S. 6t wills list down #6B of all the process which is using a particular file.
2. How do you find which remote hosts are connecting to your host on a particuIar port say 10123?
Ny using netstat command execute netstat Oa Y grep aporta and it will list the entire host which is connected to this host on port 1=12%.
3. What is nohup in UNIX?
4. What is ephemeraI port in UNIX?
Pphemeral ports are port used by &perating system for client soc*ets. !here is a specific range on which &: can open any port specified by ephemeral
port range.
5. If one process is inserting data into your MySQL database? How wiII you check how many rows inserted into every second?
#urpose of this Anix "ommand 6nterview is as*ing about "watch" command in A76S which is repeatedly execute command provided with specified
delay.
6. There is a fiIe Unix_Test.txt which contains words Unix, how wiII you repIace aII Unix to UNIX?
Jou can answer this Anix "ommand 6nterview Luestion by using :PB command in A76S for example you can execute sed s/Unix/UNIX/g fiIeName.
7. You have a tab separated fiIe which contains Name, Address and Phone Number, Iist down aII Phone Number without there name and
Addresses?
!o answer this Anix "ommand 6nterview Luestion you can either you A>Q or "A! command here. "A! use tab as default separator so you can use
cut -f3 fiIename.
8. Your appIication home directory is fuII? How wiII you find which directory is taking how much space?
Ny using dis* usage CBAD command in Anix for example du -sh . | grep G will list down all the directory which has G6G: in :iRe.
9. How do you find for how many days your Server is up?
Ny using uptime command in A76S
10. You have an IP address in your network how wiII you find hostname and vice versa?
!his is a standard A76S command interview Luestion as*ed by everybody and 6 guess everybody *nows its answer as well. Ny using nsIookup
command in A76S, you can read more about Convert IP Address to hostname in Unix here.
'ead more: http:IIjavarevisited.blogspot.comI2=11I=+IunixOcommandOinterviewO
Luestions.htmlcixRR%Gd;h+#A;
`uestion 1: !he A76S command
a.out W
runs the program a.out:
a. >ith highest priority
b. >ith highest speed
c. &nly when no other process is running on the system
d. In the background
e. 6s invalid
`uestion 2: >hich command will you use to see the available routes and their status?
a. show route
b. route status
c. netstat -rn
d. 7one of the above
`uestion %: >hich of the following commands can be used to view the calendar of April 2==5?
a. $caI apriI 2007
b. [cal april =5
c. [calendar ) =5
d. [cal ) 2==5
`uestion ): >hich command is used to run a command at a specified time?
a. timer
b. at
c. time
d. atL
e. dd
`uestion +: Ny which screen manipulation command can you specify the coordinates for the cursor
position ?
a. tput cup
b. tput smso
c. tput rmso
d. tput blin*
e. tput reverse
`uestion 4: >hich option of the grep filter prints out all those lines that do not match the pattern
specified by the regular expression?
a. On
b. Oc
c. -d
d. Ol
e. Ov
`uestion 5: >hat would be displayed on the screen if the pwd command is entered when the user is
wor*ing in the user directory?
a. I
b. home
c. /home/username
d. usrI
e. usrV
f. usrIusername
`uestion 8: >hich of the following statements is incorrect regarding the A76S environment?
a. It has the provision of security through the Iogin and passwd programs.
b. 6n it the file names are not case insensitive.
c. 6t has the provision of various commands and utilities for file and directory manipulation.
d. 6t does not allow relative path names.
e. 6t allows the use of wildOcard characters forfileOname expansion.
`uestion 9: >hich of the following is a responsibility of the system administrator?
a. :etting permissions for files and directories
b. "reation of users and groupOids
c. #roviding security through the use of passwords
d. a and c
e. a,b and c
`uestion 1=: Jou want to declare a variable vs with the value hello. >hich of the following
declarations is correct ?
a. vs b Khello@
b. vsOhello?
c. vsbhello
d. a or b
e. b or c
`uestion 11: >hat control character signals the end of the file ?
a. "trlea
b. "trleb
c. "trlec
d. CtrI+d
e. "trlee
`uestion 12: >hich of the following commands will you use to send the contents of a file named abc
to a user named 'aven by mail?
a. mail ravenVabc
b. maiI raven<
c. mail ravenfabc
d. mail raven abc
`uestion 1%: >hat option of the sort filter would you use if you want to save the output on a dis* file ?
a. Or
b. Of
c. On
d. Ot
e. -o
`uestion 1): >hich command prints the current wor*ing directory ?
a. pwd
b. cd
c. 6s
d. mv
e. cp
`uestion 1+: >hich option of the uniL command would you use to display only those lines which have
a multiple occurrence ?
a. Ou
b. Od
c. -c
d. Ol
e. Or
`uestion 14: >hich of the following commands can be used to change group ownership of a
fileIdirectory?
a. chmod
b. chgroup
c. chgrp
d. grpch
`uestion 15: !he find command:
a. searches for specific patterns of characters in file.
b. is used for locating words in a file.
c. Is used to Iocate fiIes in a directory and in aII subdirectories of that directory.
d. can only be used by the administrator.
e. is used for locating users in a networ*.
`uestion 18: >ith regard to A76S, a process is:
a. the name of a command.
b. the name of the administrator.
c. the name of the A76S server.
d. a program in a state of execution
e. another name for a file.
`uestion 19: >hich of the following locations store the information about the currently installed
:oftware on a local system?
a. IvarIadmIswIinstall
b. /var/adm/sw/software
c. IvarIadmIswIrecent
d. IvarIadmIswIproducts
`uestion 2=: >hich of the following commands can be used to communicate directly with other users
by sending messages?
a. [ msg
b. $ taIk
c. [ send
d. [ call
`uestion 21: >hich file contains the commands run by all users at login?
a. /usr/init
b. IusrIprofile
c. IusrIstartup
d. IetcIstartup
e. IetcIprofile
`uestion 22: >hich command is used for splitting a file horiRontally?
a. cut
b. head
c. tail
d. b and c
e. a, b and c
`uestion 2%: >hich error will you see when an 7;: client can no longer access mounted file system?
a. ;ile 7ot ;ound
b. :tale ;ile andle
c. 6nvalid "ommand
d. FiIe InaccessibIe
`uestion 2): Ny which command can you move to a different directory ?
a. pwd
b. cd
c. ls
d. mv
e. rm
`uestion 2+: >hat communication command provides communication to another user logged on by
writing to the bottom of their terminal ?
a. tal*
b. write
c. chat
d. tal*to
e. transmit
`uestion 24: >hich of the following statements is incorrect regarding processes ?
a. More than one process can be active even if there is only one processor.
b. A bac*ground process runs as a child process of the shell.
c. 6f the parent process is *illed.then always, the child process is also terminated,
d. A process can be kiIIed by pressing the ctrI+c keys.
e. A process can be *illed by the *ill command.
`uestion 25: >hich of the following characters can be used to run multiple commands on a single
line?
a. I
b. :
c. ,
d. ;
`uestion 28: >hich filter will you use to translate a set of charaters to another ?
a. grep
b. cut
c. tr
d. wc
e. tee
`uestion 29: >hich character of the grep filter specifies that the pattern preceding it must occur at the
end of each line ?
a. gh
b. _
c. $
d. .
e. ^
`uestion %=: !he file oldiesOgoldies has the details of the sale of boo*s. !he records are sorted on the
names of the authors and are as follows
Alexandre Bumas
Alexandre Bumas
Alexandre Bumas
Gerald Burrell
Giovanni Guareschi
Giovanni Guareschi
dames erriot
$ouisa May Alcott
$ouisa May Alcott
$ouisa May Alcott
Nased on the above information, what will be the output of the command
uniL Ou oldiesOgoldies ?
a. Gerald Burrell
b. dames erriot
c. Gerald Burrell
dames erriot
d. AIexandre Dumas
GeraId DurreII
Giovanni Guareschi
James Herriot
Louisa May AIcott
e. $ouisa May Alcott
`uestion %1: >hat is the number of fields in each line in IetcIpasswd file?
a. %
b. )
c. +
d. 4
e. 7
`uestion %2: >hich *ey combination instructs the shell to terminate the session ?
a. "trl e L
b. CtrI + d
c. "trl e s
d. "trl e r
e. "trl e R
`uestion %%: >hich command gives all differences between two files ?
a. filecmp
b. filecompare
c. filediff
d. diff
`uestion %): >hat is the file descriptor for the standard output file ?
a. =
b. 1
c. 2
d. %
e. )
`uestion %+: >hich command enables you to concatenate files ?
a. cp
b. mv
c. concat
d. ls
e. cat
`uestion %4: #oint out the incorrect statement regarding standard input, output and error:
a. !he terminal is the standard source for input and the standard output and standard error
destination for most A76S commands.
b. All data sources and destinations are treated as files in A76S.
c. The three standard fiIes have a fiIe descriptor
0 - standard output fiIe
1 - standard input fiIe
2 - standard error fiIe
d. !he input. output and error output can be redirected to a file other than the standard file using file
descriptors and the V or X symbol.
e. !he output and error can be redirected in the append mode to add the redirected output or error to
an existing file using the i symbol.
`uestion %5: >hich of the following is not a filter?
a. sort
b. grep
c. uniL
d. #9
e. echo
`uestion %8: >hich of the following files is configured for login name, login directory and login shell
variables?
a. IetcIprofile
b. IetcIhome
c. /etc/passwd
d. IetcIconf
`uestion %9: >hich *eystro*e combination sends or signals an interrupt reLuest to a process ?
a. CtrI+c
b. "trled
c. "trleu
d. "trles
e. "trleL
`uestion )=: Ny which command a user can add a password for his login name?
a. passwd
b. pass
c. chpass
d. password
e. setpass
g'elated postsh
#rotected: oBes* !"#I6# !est `uestions and Answers Biscussions
!here is no excerpt because this is a protected post....
$inux, A76S Birectories
$inux directory structure Mount #oint Pxplanation I 'oo g...h...
:hell types
sh or Nourne :hell j the original shell still use g...h...
IetcIgroup g:ystem ;ilesh
IetcIgroup is a text file which defines the groups to w g...h...
:ending mail from bash g:cripth
!he mail command can be used under $inux or A76S bash, g...h...
LINUX, UNIX, SAN, SYSTEM ADMINISTRATOR,
LINUX SERVER ENGINEER, STORAGE
ADMINISTRATOR LAST-MINUTE BOTTOM
LINE JOB INTERVIEW PREPARATION
QUESTIONS & ANSWERS [KindIe Edition]
Top 10 FrequentIy Unix and Linux Interview Questions and Answers
1) How to find aII the Iinks in a foIder in UNIX or Linux System?
Jou Qnow this is a puRRle type A76S Luestion as there is no specific command to find all symbolic
lin*s. :o you need to use ls command which list is coming in directory starts with 2lZ as first
characters.
Nelow is your actual A76S command to find all lin*s in a directory:
[ls Olrt
total 2.=Q
OrwOrjrj 1 $inux Bomain Asers = dan 4 2=11
drwxrOxrOxe 1 $inux Bomain Asers = :ep 19 12:%=
lrwxrwxrwx 1 $inux Bomain Asers ) &ct 19 12:%1
2) How do you find size of directory in UNIX or Linux System?
Jou *now your popular ls command doesn@t show complete siRe of directories in A76S. :o you need
to use du command to get full siRe of directories including all sub directories in A76S.
3) How to find a process and kiII that in Unix or Linux System?
!his is very simple for all of you with ps, grep and *ill command. by using "ps -ef" you can get list of
all process and then use grep to find your process and get the #6B of that process. &nce you get #6B
you can use *ill command to *ill that process.
4) How to run a program in background in UNIX or Linux ?
Jou can use &ampU to run any process in bac*ground after that you can use jobs to find the job id for
that process and can use fg and bg command to bring that process into foreground and bac*ground.
5) How to create archive fiIe in UNIX or Linux Operating System ?
>e can use tar command to create archives in A76S or $inux. Pven combine tar and gRip to create a
compressed archive in A76S.
6) How to sort output of a command in reverse order in Linux or UNIX System ?
!his is freLuently used command. we can use sort command in A76S to sort output of any command
by using #6#P. Ny using Or option with sort command to get the reverse order.
7) What is meaning of a fiIe has 644 permission ?
Jou *now this is basic Luestion related to permission of files and directories in A76S. 4)) represents
permission 11= for owner, permission 1== for group and 1== for others which means read e write for
owner who create that file and read only permission for group and others.
8) How wiII you remove empty fiIes or directories from /tmp ?
:ee how to delete empty directory and files in A76S to answer this A76S 6nterview Luestions.
9) I have read permission on a directory but I am not abIe to enter it why ?
Jou *now in order to get into a directory you need execute permission. if your directory does not have
execute permission than you can not get that directory by using cd command. read A76S files and
directory permissions for more information.
10) How do you find aII fiIes which are modified 10 minutes before ?
!his is a $inux interview Luestions e.g. find and grep. you can use Omtime option of find command to
list all the files which are modified 1= or m minutes before. see these find command examples for
more details.
O :ee more at: http:IIwww.unixbuRR.comI2=1)I=2I1=OunixOandOlinuxOinterviewOLuestionsOanswersO
wiproOtcsOcapgeminiIcsthash.'u6jiL%.dpuf
1.>hat is the difference between :olaris 1= and :olaris 11 ?
Ans:!he main differences are pac*age administration,&: 6nstallation methods,\ones Pnhancement
and networ* virtualiRation .
2.>hat *ind of pac*age system is used in :olaris 11 ?
Ans::olaris 11 uses 6mage pac*aging systemC6#:D to manage pac*ages and patches.6n both
pac*ages and patches will be treated as same elements. Jou need to configure 6#: repository locally
or remotely to manage pac*ages and patches.
%.>hat type of installation methods used in :olaris 11 ? is it possible to use jumpstart ?
Ans: 7o.Jou can@t use jumpstart or flarCflash methodD to install :olaris 11.6f you want to install &:
from networ* li*e jumpstart method,you need to configure A6 serverCAutomated 6nstaller serverD.Jou
can also use B(B to install :olaris 11 operating system.
).6s it possible to install :olaris 1= using A6 server CAutomated 6nstallerD ?
Ans:7o.Jou can@t use A6 for :olaris 1= installation.
+.>hat is default root filesystem ?
Ans:!he default root filesystem is \;:. !here is no option to select A;: as root filesystem.
4.>hat *ind of &: patching mechanism used for bac*Oout ?
Ans::ince the root filesystem is \;:,you can@t use mirror brea*ing method li*e A;:.
Jou need to create alternative boot environment of &: patching using beadm command.
5.>hat is beadm ?
Ans: beadm is used for Managing Noot Pnvironments which is similar to lu commands in :olaris 1=.
8."an we use Rones as 7;: servers in :olaris 11 ?
Ans:6n :olaris 1=,you can@t use Rones as 7;: servers but in :olaris 11 ,it is possible.
9.is possible to use :olaris 1= as Rone in :olaris 11 global Rone ?
Ans:Jes.6ts possible.:olaris 1= can be a Rone in solaris 11 global Rones.Nut you can use solaris 9
and 8 versions as Rones .
1=.>hat is process to assign a 6# address to #hysical interfaces and virtual interfaces ?
Ans:#lease go through this article.
11.ow to upgrade &: from :olaris 1= to :olaris 11 ? 6s is possible ?
Ans:7o. Jou can@t upgrade existing :olaris 1= to :olaris 11 due to new *ernel architecture
in :olaris 11.
12.ow to install :olaris 11 on the live system ? 6s it possible to install ?
Ans:Jes.Jou can install :olaris 11 on live :olaris 1= machine.ere is a high level plan to perform this
operation.
2= A76S :hell :cripting 6nterview `uestions...and Answerskkk O #art 6
As someone who has written a large number of both simple and complex A76S shell scripts during the past 1+
years, the following are some basic shell scripting interview Luestions that 6 would as* if 6 needed to hire
someone to write new shell scripts or maintain preexisting scripts for me.
!hese type of Luestions would help me to determine 6f the candidate for the position has spent any time
actually writing shell scripts, either on the job or as part of a shell scripting course or training class, or has just
read about them in boo*s or online.
$et]s get started...
(1) What is a UNIX sheII?
!he A76S shell is a program that serves as the interface between the user and the A76S operating system. 6t is
not part of the *ernel, but communicates directly with the *ernel. !he shell translates the commands you type
in to a format which the computer can understand. 6t is essentially a command line interpreter.
DetaiIs:
(isual representation of the A76S operating system environment:
$ist of commonly used A76S shells:
l !he Nourne :hell CshD
l !he " :hell Ccsh or tschD
l !he Nourne Again :hell CbashD
l !he Qorn :hell C*shD
(2) What needs to be done before you can run a sheII script from the command Iine prompt?
Jou need to ma*e the shell script executable using the A76S chmod command.
DetaiIs:
!his chmod command ma*es the shell script file aexample1a executable for the user CownerD only:
[ chmod uex example1
this syntax ma*es it executable for all CeveryoneD:
[ chmod aex example1
Jou can optionally use octal notation to set A76S permissions using the chmod command Ce.g., [ chmod 5++
example1D. !his topic is beyond the scope of this article, but you can find more information by entering aunix
file permissions chmod numeric notationa in your favorite search engine.
(3) How do you terminate a sheII script if statement?
>ith fi, which is aifa spelled bac*wards.
DetaiIs:
!he shell script example below uses an if statement to chec* if a file assigned to the variable myfile exists and
is a regular file:
ckIbinI*sh
myfileb[1
if g Of [myfile h
then
echo a[myfile existsa
fi
exit =
C:ee shell scripting interview Luestion c4 below if you do not *now what [1 in this example means.D
(4) What UNIX operating system command wouId you use to dispIay the sheII's environment variabIes?
'unning the aenva command will display the shell environment variables.
DetaiIs:
:ample env command output:
[ env
6:!;6$PbIhomeIlflI.history
#A!bIusrIlocalIbin:Ibin:IusrIbin:IusrIS11'4Ibin
:P$$bIbinI*sh
&:!7AMPblivefirelabs.com
A:P'blfl
MA6$bIvarIspoolImailIlfl
&MPbIhomeIlfl
6:!:6\Pb1===
6t would also be good to understand the purpose of the common shell environment variables that are listed in
the env command output.
(5) What code wouId you use in a sheII script to determine if a directory exists?
!he A76S test command with the Od option can be used to determine if a directory exists.
DetaiIs:
!he following test command expression would be used to verify the existence of a specified directory, which is
stored in the variable [mydir:
if g Od [mydir h
then
commandCsD
fi
6f the value stored in the variable mydir exists and is a directory file, the commandCsD located between then and
fi will be executed.
Jou can consult the test command]s man page Ca[ man testaD to see what test command options are available
for use.
(6) How do you access command Iine arguments from within a sheII script?
Arguments passed from the command line to a shell script can be accessed within the shell script by using a [
Cdollar signD immediately followed with the argument]s numeric position on the command line.
DetaiIs:
;or example, [1 would be used within a script to access the first argument passed from the command line, [2
the second, [% the third and so on. Bonus: [= contains the name of the script itself.
(7) How wouId you use AWK to extract the sixth fieId from a Iine of text containing coIon (:) deIimited
fieIds that is stored in a variabIe caIIed passwd_Iine?
echo [passwd<line Y aw* O;: ]m print [4 n]
DetaiIs:
"onsider this line of text stored in the variable [passwd<line O
[ echo [passwd<line
mail:x:8:12:mail:IvarIspoolImail:
[
CBackground: !he lines in the system passwd file are delimited CseparatedD by a colon C:D...[passwd<line
contains a single line from the passwd file.D
!he output of the echo command is piped to A>Q. !he Of option for the aw* command informs aw* of what the
field separator is Ccolon in this exampleD, and print [4 instructs aw* to print the 4th field in the line.
(8) What does 2>&1 mean and when is it typicaIIy used?
!he 2VW1 is typically used when running a command with its standard output redirected to a file. ;or example,
consider:
command V file 2VW1
Anything that is sent to command]s standard output will be redirected to afilea in this example.
!he 2 Cfrom 2VW1D is the A76S file descriptor used by standard error CstderrD. !herefore, 2VW1 causes the shell
to send anything headed to standard error to the same place messages to standard output C1D are sent...which
is afilea in the above example.
!o ma*e this a little clearer, the V in between acommanda and afilea in the example is eLuivalent to 1V.
Before you continue reading... Has this articIe been heIpfuI to you? WouId it benefit others? If you
answered "yes" to either question, kindIy share the page.
MORE READERS = MORE FUTURE ARTICLES
Thank you for sharing.
(9) What are some ways to debug a sheII script probIem?
Although this is somewhat dependent on what the problem is, there are a few commonly used methods for
debugging shell script problems.
&ne method, which is freLuently used across all programming languages, is to insert some debug statements
within the shell script to output information to help pinpoint where and why the problem is being introduced.
Another method specific to shell scripting is using aset Oxa to enable debugging.
DetaiIs:
"onsider the following shell script example Cnotice that aset Oxa is commented out at this timeD:
ckIbinI*sh
cset Ox
ib1
while g [i Olt 4 h
do
print ain loop iteration: [ia
CCieb1DD
done
exit
!his script will produce the following output:
[ .Iscript1
in loop iteration: 1
in loop iteration: 2
in loop iteration: %
in loop iteration: )
in loop iteration: +
[
6f we uncomment Cremove the cD from the aset Oxa line in the script, this is what is displayed when the script
runs:
[ .Iscript1
e ib1
e g 1 Olt 4 h
e print in loop iteration: 1
in loop iteration: 1
e let ieb1
e g 2 Olt 4 h
e print in loop iteration: 2
in loop iteration: 2
e let ieb1
e g % Olt 4 h
e print in loop iteration: %
in loop iteration: %
e let ieb1
e g ) Olt 4 h
e print in loop iteration: )
in loop iteration: )
e let ieb1
e g + Olt 4 h
e print in loop iteration: +
in loop iteration: +
e let ieb1
e g 4 Olt 4 h
e exit
[
6n addition to displaying the intended output Cain loop iterationa linesD, enabling debugging with aset Oxa also
shows each line of execution preceded by a plus sign CeD.
Although this can become unwieldly for larger shell scripts, it should be obvious how useful this can be when
debugging a shell script to identify the root cause of a problem.
(10) Within a UNIX sheII scripting Ioop construct, what is the difference between the break and
continue?
Asing brea* within a shell scripting loop construct will cause the entire loop to terminate. A continue will cause
the current iteration to terminate, but the loop will continue on the next iteration.
Do you need to practice writing and executing UNIX sheII scripts (on a REAL SERVER) before the
interview? >ith a highly concentrated effort, either of these online courses can be completed within 2)
hours...
A76S and $inux &perating :ystem ;undamentals contains a very good a6ntroduction to A76S :hell :criptinga
module, and should be ta*en if you are new to the A76S and $inux operating system environments or need a
refresher on *ey concepts.
A76S :hell :cripting is a good option if you are already comfortable with A76S or $inux and just need to
sharpen your *nowledge about shell scripting and the A76S shell in general.
...or you can optionally select a subset of modules from the course to focus on prior to the interview and then
return to wor* on the remaining topics as your schedule permits.
Noth courses include access to an 6nternet $ab system for completing the course]s handsOon exercises, which
are used to reOenforce the *ey concepts presented in the course. Any Luestions you may have while ta*ing the
course are answered by an experienced A76S technologist.
!han*s for reading,
and best of luc* with your shell scripting interview Luestions and your interview in generalkkk
1. (M>are Qernel is a #roprietary Qenral and is not based on any of the A76S operating systems, it]s a *ernel developed
by (M>are "ompany.
2. !he (MQernel can]t boot it by itself, so that it ta*es the help of the %rd party operating system. 6n (M>are case the
*ernel is booted by 'edat $inux operating system which is *nown as service console.
%. !he service console is developed based up on 'edhat $inux &perating system, it is used to manage the (MQernel
4. To restart webaccess service on vmware
service vmwareOwebaccess restart j this will restart apache tomcat app
5. To restart ssh service on vmware
service sshd restart
6. To restart host agent(vmware-hostd) on vmware esx server
service mgmtOvmware restart
7. Path for the struts-config.xmI
IusrIlibIvmwareIwebAccessItomcatIapacheOtomcatO+.+.15IwebappsIuiI>PNO67;I
8. To start the scripted instaII the command is
esx *sbnfs:111.222.%%%.))):IdataIQ:.config *sdevicebeth=
location device name
9. VirtuaI Network in SimpIe.......
(irtual 7icCsD on (irtual MachineCsD OOOOOV
#hysical 7ic on the P:S :erver C(irtual :witch O +4 #ortsD OOOOOV
#hysical :witch #ort :hould be trun*ed with all the ($A7: to which the (M]s need access
All the P:S servers should be configured with :ame number of #hysical 7ics Cv:witchesD and "onnectivity also should be
same, :o that vMotion succeeds
All the (irtual Machines are connected to one v:witch with Bifferent ($A7:, this means the #hysical 7icCv:witchD needs
to be trun*ed with the same ($A7: on the #hysical :witch #ort
10 What are the three port groups present in ESX server networking
1. (irtual Machine #ort Group O Ased for (irtual Machine 7etwor*
2. :ervice "onsole #ort Group O Ased for :ervice "onsole "ommunications
%. (MQernel #ort Group O Ased for (Motion, i:":6, 7;: "ommunications
11. What is the use of a Port Group?
!he port group segregates the type of communication.
12. What are the type of communications which requires an IP address for sure ?
:ervice "onsole and (MQernel C(Motion and i:":6D, these communications does not happen without an ip address
C>hether it is a single or dedicatedD
13. In the ESX Server Iicensing features VMotion License is showing as Not used, why?
Pven though the license box is selected, it shows as a$icense 7ot Aseda until, you enable the (Motion option for
specific v:witch
14. How the VirtuaI Machineort group communication works ?
All the vm]s which are configured in (M #ort Group are able to connect to the physical machines on the networ*. :o
this port group enables communication between v:witch and #hysical :witch to connect vm]s to #hysical Machine]s
15. What is a VLAN ?
A ($A7 is a logical configuration on the switch port to segment the 6# !raffic. ;or this to happen, the port must be
trun*ed with the correct ($A7 6B.
Nac* to the top
16. Does the vSwitches support VLAN Tagging? Why?
Jes, !he v:witches support ($A7 !agging, otherwise if the virtual machines in an esx host are connected to different
($A7:, we need to install a separate physical nic Cv:witchD for every ($A7. !hat is the reason vmware included the
($A7tagging for v:witches. :o every v:witch supports upto 1=14 ports, and N!> they can support 1=14 ($A7: if
needed, but an P:S server doesn@t support that many (M@s. :D
17. What is Promiscuous Mode on vSwitch ? What happens if it sets to Accept?
6f the promiscuous mode set to Accept, all the communication is visible to all the virtual machines, in other words all the
pac*ets are sent to all the ports on v:witch
6f the promiscuous mode set to 'eject, the pac*ets are sent to inteded port, so that the intended virtual machine was
able to see the communication.
18. What is MAC address Changes ? What happens if it is set to Accept ?
>hen we create a virtual machine the configuration wiRard generates a MA" address for that machine, you can see it in
the .vmx C(M "onfigD file. 6f it doesn]t matches with the MA" address in the &: this setting does not allow incoming traffic
to the (M. :o by setting 'eject &ption both MA" addresses will be remains same, and the incoming traffic will be allowed
to the (M.
19. What is Forged Transmits ? What happens if it is set to Accept ?
>hen we create a virtual machine the configuration wiRard generates a MA" address for that machine, you can see it in
the .vmx C(M "onfigD file. 6f it doesn]t matches with the MA" address in the &: this setting does not allow outgoing traffic
from the (M. :o by setting 'eject &ption both MA" addresses will be remains same, and the outgoing traffic will be
allowed from the (M.
20. What are the core services of VC ?
(M provisioning , !as* :cheduling and Pvent $ogging
21. Can we do vMotion between two datacenters ? If possibIe how it wiII be?
Jes we can do vMotion between two datacenters, but the mandatory reLuirement is the (M should be powered off.
22. What is VC agent? and what service it is corresponded to? What are the minimum req's for VC agent
instaIIation ?
(" agent is an agent installed on P:S server which enables communication between (" and P:S server.
!he daemon associated with it is called vmwareOhostd , and the service which corresponds to it is called as mgmtO
vmware, in the event of (" agent failure just restart the service by typing the following command at the service
console
" service mgmt-vmware restart "
(" agent installed on the P:S server when we add it to the (", so at the time of installtion if you are getting an error li*e a
(" Agent service failed to install a, chec* the I&pt siRe whether it is sufficient or not.
23. How can you edit VI CIient Settings and VC Server Settings ?
"lic* Pdit Menu on (" and :elect "lient :ettings to change (6 settings
"lic* Administration Menu on (" and :elect (" Management :erver "onfiguration to "hange (" :ettings
24. What are the fiIes that make a VirtuaI Machine ?
.vmx O (irtual Machine "onfiguration ;ile
.nvram O (irtual Machine N6&:
.vmd* O (irtual Machine Bis* file
.vswp O (irtual Machine :wap ;ile
.vmsd O (irtual MAchine :napshot Batabase
.vmsn O (irtual Machine :napshot file
.vmss O (irtual Machine :uspended :tate file
.vmware.log O "urrent $og ;ile
.vmwareOc.log O &ld $og file
25. What are the devices that can be added whiIe the virtuaI Machine running
6n (6 %.+ we can add ard Bis* and 76"]s while the machine running.
6n v:phere ).= we can add Memory and #rocessor along with BB and 76"]s while the machine running
26. How to set the time deIay for BIOS screen for a VirtuaI Machine?
'ight "lic* on (M, select edit settings, choose options tab and select boot option, set the delay how much you want.
27. What is a tempIate ?
>e can convert a (M into !emplate, and it cannot be powered on once its changed to template. !his is used to Luic*
provisioning of (M]s.
23. What to do to customize the windows virtuaI machine cIone,?
copy the sysprep files to (irtual center directory on the server, so that the wiRard will ta*e the advantage of it.
24. What to do to customize the Iinux/unix virtuaI machine cIone,?
(" itself includes the customiRation tools, as these operating systems are available as open source.
25. Does cIoning from tempIate happens between two datacenters ?
Jes.. it can, if the template in one datacenter, we can deploy the vm from that template in another datacenter without any
problem.
Nac* to the top
26. What are the common issues with snapshots? What stops from taking a snapshot and how to fix it ?
6f you configure the (M with Mapped $A7]s, then the snapshot failed. 6f it is mapped as virtual then we can ta*e a
snapshot of it.
6f you configure the (M with Mapped $A7]s as physical, you need to remove it to ta*e a snapshot.
27. What are the settings that are taken into to consideration when we initiate a snapshot ?
(irtual Machine "onfiguration C>hat hardware is attached to itD
:tate of the (irtual Machine ard Bis* file C !o revert bac* if neededD
:tate of the (irtual Machine Memory Cif it is powered onD
28. What are the requirements for Converting a PhysicaI machine to VM ?
An agent needs to be installed on the #hysical machine
(6 client needs to be installed with "onverter #lugOin
A server to importIexport virtual machines
29. What is VMWare consoIidated backup ?
6t is a bac*up framewor*, that supports %rd party utilities to ta*e bac*ups of P:S servers and (irtual Machines. 6ts not a
bac*up service.
30. To open the guided consoIidation tooI, what are the user requirements ?
!he user must be member of administrator, !he user should have a$ogon as servicea privileges O !o give a user these
privileges,open local sec policy, select $ogon as service policy and add the user the user should have read access to AB
to send Lueries
O :ee more at: http:IIwww.=1world.inIpIvmwareOadminOinterviewO
Luestions.htmlcsthash.rbL$Mt(.dpuf
1) What is UNIX?
6t is a portable operating system that is designed for both efficient multiOtas*ing and multOuser
functions. 6ts portability allows it to run on different hardware platforms. 6t was written is " and lets
user do processing and control under a shell.
2) What are fiIters?
!he term ;ilter is often used to refer to any program that can ta*e input from standard input, perform
some operation on that input, and write the results to standard output. A ;ilter is also any program
that can be used between two other programs in a pipeline.
3) What is a typicaI syntax being foIIowed when issuing commands in sheII?
!ypical command syntax under the A76S shell follows the format:
"ommand gOargumenth gOargumenth gOOargumenth gfileh
4) Is there a way to erase aII fiIes in the current directory, incIuding aII its sub-directories,
using onIy one command?
Jes, that is possible. Ase 2rm jr oZ for this purpose. !he rm command is for deleting files. !he jr
option will erase directories and subdirectories, including files within. !he asteris* represents all
entries.
5) What is the chief difference between the -v and -x option s to set?
!he jv option echoes each command before arguments and variables have been substituted forU the
jx option echoes the commands after substitution has ta*en place.
6) What is KerneI?
Qernel is the A76S operating system. 6t is the master program that controls the computer@s resources,
allotting them to different users and to different tas*s. owever, the *ernel doesn@t deal directly with a
user. 6nstead, it starts up a separate, interactive program, called a shell, for each user when heIshe
logs on.
7) What is SheII?
A shell acts as an interface between the user and the system. As a command interpreter, the shell
ta*es commands and sets them up for execution.
8 ) What are the key features of the Korn SheII?
j history mechanism with builtOin editor that simulates emacs or vi
j builtOin integer arithmetic
j string manipulation capabilities
j command aliasing
j arrays
j job control
9) What are some common sheIIs and what are their indicators?
sh j Nourne shell
csh j " :ell
bash j Nourne Again :hell
tcsh j enhanced " :hell
Rsh j \ :ell
*sh j Qorn :ell
10) Differentiate muItiuser from muItitask.
Multiuser means that more than one person can use the computer at the same time. Multitas* means
that even a single user can have the computer wor* on more than one tas* or program at the same
time.
11) What is command substitution?
"ommand substitution is one of the steps being performed every time commands are processed by
the shell. "ommands that are enclosed in bac*Luotes are executed by the shell. !his will then
replace the standard output of the command and displayed on the command line.
12) What is a directory?
Pvery file is assigned to a directory. A directory is a specialiRed form of file that maintains a list of all
files in it.
13) What is inode?
An inode is an entry created on a section of the dis* set aside for a file system. !he inode contains
nearly all there is to *now about a file, which includes the location on the dis* where the file starts, the
siRe of the file, when the file was last used, when the file was last changed, what the various read,
write and execute permissions are, who owns the file, and other information.
14) You have a fiIe caIIed tonky in the directory honky. Later you add new materiaI to tonky.
What changes take pIace in the directory, inode, and fiIe?
!he directory entry is unchanged, since the name and inode number remain unchanged. 6n the inode
file, the file siRe, time of last access, and time of last modification are updated. 6n the file itself, the
new material is added.
15) Describe fiIe systems in UNIX
Anderstanding file systems in A76S has to do with *nowing how files and inodes are stored on a
system. >hat happens is that a dis* or portion of a dis* is set aside to store files and the inode
entries. !he entire functional unit is referred to as a file system.
16) Differentiate reIative path from absoIute path.
'elative path refers to the path relative to the current path. Absolute path, on the other hand, refers to
the exact path as referenced from the root directory.
17) ExpIain the importance of directories in a UNIX system
;iles in a directory can actually be a directory itselfU it would be called a subdirectory of the original.
!his capability ma*es it possible to develop a treeOli*e structure of directories and files, which is
crucial in maintaining an organiRational scheme.
18) BriefIy describe the SheIIs responsibiIities
j program execution
j variable and file name substitution
j 6I& redirection
j pipeline hoo*up
j environment control
j interpreted programming language
19) What are sheII variabIes?
:hell variables are a combination of a name C identifierD, and an assigned value, which exist within the
shell. !hese variables may have default values, or whose values can be manually set using the
appropriate assignment command. Pxamples of shell variable are #A!, !P'M and &MP.
20) What are the differences among a system caII, a Iibrary function, and a UNIX command?
A system call is part of the programming for the *ernel. A library function is a program that is not part
of the *ernel but which is available to users of the system. A76S commands, however, are standO
alone programsU they may incorporate both system calls and library functions in their programming.
21) What is Bash SheII?
6t is a free shell designed to wor* on the A76S system. Neing the default shell for most A76SObased
systems, it combines features that are available both in the " and Qorn :hell.
22) Enumerate some of the most commonIy used network commands in UNIX
j telnet j used for remote login
j ping j an echo reLuest for testing connectivity
j su j user switching command
j ftp j file transfer protocol used for copying files
j finger j information gathering command
23) Differentiate cmp command from diff command.
!he cmp command is used mainly to compare two files byte by byte, after which the first encountered
mismatch is shown. &n the other hand, the diff command is used to indicate the changes that is to be
made in order to ma*e the two files identical to each other.
24) What is the use of -I when Iisting a directory?
Ol, which is normally used in listing command li*e ls, is used to show files in a long format, one file per
line. $ong format refers to additional information that is associated with the file, such as ownership,
permissions, data and filesiRe.
25) What is piping?
#iping, represented by the pipe character 2YZ, is used to combine two or more commands together.
!he output of the first command serves as input the next command, and so on.
76S O $67AS 6nterview `uestions and Answers : Advanced
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
1. ow are devices represented in A76S?
All devices are represented by files called special files that are located inIdev directory. !hus, device files and
other files are named and accessed in the same way. A ]regular file] is just an ordinary data file in the dis*. A
]bloc* special file] represents a device with characteristics similar to a dis* Cdata transfer in terms of bloc*sD. A
]character special file] represents a device with characteristics similar to a *eyboard Cdata transfer is by stream
of bits in seLuential orderD.
2. >hat is ]inode]?
All A76S files have its description stored in a structure called ]inode]. !he inode contains info about the fileOsiRe,
its location, time of last access, time of last modification, permission and so on. Birectories are also
represented as files and have an associated inode. 6n addition to descriptions about the file, the inode contains
pointers to the data bloc*s of the file. 6f the file is large, inode has indirect pointer to a bloc* of pointers to
additional data bloc*s Cthis further aggregates for larger filesD. A bloc* is typically 8*.
6node consists of the following fields:
;ile owner identifier
;ile type
;ile access permissions
;ile access times
7umber of lin*s
;ile siRe
$ocation of the file data
%. Nrief about the directory representation in A76S
A Anix directory is a file containing a correspondence between filenames and inodes. A directory is a special
file that the *ernel maintains. &nly *ernel modifies directories, but processes can read directories. !he
contents of a directory are a list of filename and inode number pairs. >hen new directories are created, *ernel
ma*es two entries named ].] Crefers to the directory itselfD and ]..] Crefers to parent directoryD.
:ystem call for creating directory is m*dir Cpathname, modeD.
). >hat are the Anix system calls for 6I&?
openCpathname,flag,modeD O open file
creatCpathname,modeD O create file
closeCfiledesD O close an open file
readCfiledes,buffer,bytesD O read data from an open file
writeCfiledes,buffer,bytesD O write data to an open file
lsee*Cfiledes,offset,fromD O position an open file
dupCfiledesD O duplicate an existing file descriptor
dup2Coldfd,newfdD O duplicate to a desired file descriptor
fcntlCfiledes,cmd,argD O change properties of an open file
ioctlCfiledes,reLuest,argD O change the behaviour of an open file
!he difference between fcntl anf ioctl is that the former is intended for any open file, while the latter is for
deviceOspecific operations.
+. ow do you change ;ile Access #ermissions?
Pvery file has following attributes:
owner]s user 6B C 14 bit integer D
owner]s group 6B C 14 bit integer D
;ile access mode word
]r w x Or w xO r w x]
Cuser permissionOgroup permissionOothers permissionD
rOread, wOwrite, xOexecute
!o change the access mode, we use chmodCfilename,modeD.
Pxample 1:
!o change mode of myfile to ]rwOrwOrj] Cie. read, write permission for user O read,write permission for group O
only read permission for othersD we give the args as:
chmodCmyfile,=44)D .
Pach operation is represented by discrete values
]r] is )
]w] is 2
]x] is 1
!herefore, for ]rw] the value is 4C)e2D.
Pxample 2:
!o change mode of myfile to ]rwxrjrj] we give the args as:
chmodCmyfile,=5))D.
4. >hat are lin*s and symbolic lin*s in A76S file system?
A lin* is a second name Cnot a fileD for a file. $in*s can be used to assign more than one name to a file, but
cannot be used to assign a directory more than one name or lin* filenames on different computers.
:ymbolic lin* ]is] a file that only contains the name of another file.&peration on the symbolic lin* is directed to
the file pointed by the it.Noth the limitations of lin*s are eliminated in symbolic lin*s.
"ommands for lin*ing files are:
$in* ln filename1 filename2
:ymbolic lin* ln Os filename1 filename2
5. >hat is a ;6;&?
;6;& are otherwise called as ]named pipes]. ;6;& CfirstOinOfirstOoutD is a special file which is said to be data
transient. &nce data is read from named pipe, it cannot be read again. Also, data can be read only in the order
written. 6t is used in interprocess communication where a process writes to one end of the pipe CproducerD and
the other reads from the other end CconsumerD.
8. ow do you create special files li*e named pipes and device files?
!he system call m*nod creates special files in the following seLuence.
1. *ernel assigns new inode,
2. sets the file type to indicate that the file is a pipe, directory or special file,
%. 6f it is a device file, it ma*es the other entries li*e major, minor device numbers.
;or example:
6f the device is a dis*, major device number refers to the dis* controller and minor device number is the dis*.
9. Biscuss the mount and unmount system calls
!he privileged mount system call is used to attach a file system to a directory of another file systemU the
unmount system call detaches a file system. >hen you mount another file system on to your directory, you are
essentially splicing one directory tree onto a branch in another directory tree. !he first argument to mount call
is the mount point, that is , a directory in the current file naming system. !he second argument is the file
system to mount to that point. >hen you insert a cdrom to your unix system]s drive, the file system in the
cdrom automatically mounts to IdevIcdrom in your system.
1=. ow does the inode map to data bloc* of a file?
6node has 1% bloc* addresses. !he first 1= are direct bloc* addresses of the first 1= data bloc*s in the file. !he
11th address points to a oneOlevel index bloc*. !he 12th address points to a twoOlevel Cdouble inOdirectionD
index bloc*. !he 1%th address points to a threeOlevelCtriple inOdirectionDindex bloc*. !his provides a very large
maximum file siRe with efficient access to large files, but also small files are accessed directly in one dis* read.
11. >hat is a shell?
A shell is an interactive user interface to an operating system services that allows an user to enter commands
as character strings or through a graphical user interface. !he shell converts them to system calls to the &: or
for*s off a process to execute the command. :ystem call results and other information from the &: are
presented to the user through an interactive interface. "ommonly used shells are sh,csh,*s etc.
12. Nrief about the initial process seLuence while the system boots up.
>hile booting, special process called the ]swapper] or ]scheduler] is created with #rocessO6B =. !he swapper
manages memory allocation for processes and influences "#A allocation. !he swapper inturn creates %
children:
the process dispatcher,
vhand and
dbflush
with 6Bs 1,2 and % respectively.
!his is done by executing the file IetcIinit. #rocess dispatcher gives birth to the shell. Anix *eeps trac* of all the
processes in an internal data structure called the #rocess !able Clisting command is ps OelD.
1%. >hat are various 6Bs associated with a process?
Anix identifies each process with a uniLue integer called #rocess6B. !he process that executes the reLuest for
creation of a process is called the ]parent process] whose #6B is ]#arent #rocess 6B]. Pvery process is
associated with a particular user called the ]owner] who has privileges over the process. !he identification for
the user is ]Aser6B]. &wner is the user who executes the process. #rocess also has ]Pffective Aser 6B] which
determines the access privileges for accessing resources li*e files.
getpidCD Oprocess id
getppidCD Oparent process id
getuidCD Ouser id
geteuidCD Oeffective user id
1). Pxplain for*CD system call.
!he pfor*CD] used to create a new process from an existing process. !he new process is called the child
process, and the existing process is called the parent. >e can tell which is which by chec*ing the return value
from pfor*CD]. !he parent gets the child]s pid returned to him, but the child gets = returned to him.
1+. #redict the output of the following program code
mainCD
m
for*CDU
printfCaello >orldkaDU
n
Answer:
ello >orldkello >orldk
Pxplanation:
!he for* creates a child that is a duplicate of the parent process. !he child begins from the for*CD.All the
statements after the call to for*CD will be executed twice.Conce by the parent process and other by childD. !he
statement before for*CD is executed only by the parent process.
14. #redict the output of the following program code
mainCD
m
for*CDU for*CDU for*CDU
printfCaello >orldkaDU
n
Answer:
aello >orlda will be printed 8 times.
Pxplanation:
2_n times where n is the number of calls to for*CD
15. $ist the system calls used for process management:
:ystem calls Bescription
for*CD !o create a new process
execCD !o execute a new program in a process
waitCD !o wait until a created process completes its execution
exitCD !o exit from a process execution
getpidCD !o get a process identifier of the current process
getppidCD !o get parent process identifier
niceCD !o bias the existing priority of a process
br*CD !o increaseIdecrease the data segment siRe of a process.
18. ow can you getIset an environment variable from a program?
Getting the value of an environment variable is done by using pgetenvCD]. :etting the value of an environment
variable is done by using pputenvCD].
19. ow can a parent and child process communicate?
A parent and child can communicate through any of the normal interOprocess communication schemes Cpipes,
soc*ets, message Lueues, shared memoryD, but also have some special ways to communicate that ta*e
advantage of their relationship as a parent and child. &ne of the most obvious is that the parent can get the
exit status of the child.
2=. >hat is a Rombie?
>hen a program for*s and the child finishes before the parent, the *ernel still *eeps some of its information
about the child in case the parent might need it O for example, the parent may need to chec* the child]s exit
status. !o be able to get this information, the parent calls pwaitCD]U 6n the interval between the child terminating
and the parent calling pwaitCD], the child is said to be a pRombie] C6f you do pps], the child will have a p\] in its
status field to indicate this.D
21. >hat are the process states in Anix?
As a process executes it changes state according to its circumstances. Anix processes have the following
states:
'unning : !he process is either running or it is ready to run .
>aiting : !he process is waiting for an event or for a resource.
:topped : !he process has been stopped, usually by receiving a signal.
\ombie : !he process is dead but have not been removed from the process table.
$inux 6nterview `uestions And Answers
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Jou need to see the last fifteen lines of the files dog, cat and horse. >hat command should you use?
tail O1+ dog cat horse
!he tail utility displays the end of a file. !he O1+ tells tail to display the last fifteen lines of each specified file.
>ho owns the data dictionary?
!he :J: user owns the data dictionary. !he :J: and :J:!PM users are created when the database is
created.
Jou routinely compress old log files. Jou now need to examine a log from two months ago. 6n order to view its
contents without first having to decompress it, use the <<<<<<<<< utility.
Rcat
!he Rcat utility allows you to examine the contents of a compressed file much the same way that cat displays a
file.
Jou suspect that you have two commands with the same name as the command is not producing the expected
results. >hat command can you use to determine the location of the command being run?
which
!he which command searches your path until it finds a command that matches the command you are loo*ing
for and displays its full path.
Jou locate a command in the Ibin directory but do not *now what it does. >hat command can you use to
determine its purpose.
whatis
!he whatis command displays a summary line from the man page for the specified command.
Jou wish to create a lin* to the Idata directory in bob]s home directory so you issue the command ln Idata
IhomeIbobIdatalin* but the command fails. >hat option should you use in this command line to be successful.
Ase the O; option
6n order to create a lin* to a directory you must use the O; option.
>hen you issue the command ls Ol, the first character of the resulting display represents the file]s
<<<<<<<<<<<.
type
!he first character of the permission bloc* designates the type of file that is being displayed.
>hat utility can you use to show a dynamic listing of running processes<<<<<<<<<?
top
!he top utility shows a listing of all running processes that is dynamically updated.
>here is standard output usually directed?
to the screen or display
Ny default, your shell directs standard output to your screen or display.
Jou wish to restore the file memo.ben which was bac*ed up in the tarfile MyNac*up.tar. >hat command should
you type?
tar xf MyNac*up.tar memo.ben
!his command uses the x switch to extract a file. ere the file memo.ben will be restored from the tarfile
MyNac*up.tar.
Jou need to view the contents of the tarfile called MyNac*up.tar. >hat command would you use?
tar tf MyNac*up.tar
!he t switch tells tar to display the contents and the f modifier specifies which file to examine.
Jou want to create a compressed bac*up of the users] home directories. >hat utility should you use?
tar
Jou can use the R modifier with tar to compress your archive at the same time as creating it.
>hat daemon is responsible for trac*ing events on your system?
syslogd
!he syslogd daemon is responsible for trac*ing system information and saving it to specified log files.
Jou have a file called phonenos that is almost ),=== lines long. >hat text filter can you use to split it into four
pieces each 1,=== lines long?
split
!he split text filter will divide files into eLually siRed pieces. !he default length of each piece is 1,=== lines.
Jou would li*e to temporarily change your command line editor to be vi. >hat command should you type to
change it?
set Oo vi
!he set command is used to assign environment variables. 6n this case, you are instructing your shell to assign
vi as your command line editor. owever, once you log off and log bac* in you will return to the previously
defined command line editor.
>hat account is created when you install $inux?
root
>henever you install $inux, only one user account is created. !his is the superuser account also *nown as
root.
>hat command should you use to chec* the number of files and dis* space used and each user]s defined
Luotas?
repLuota
n order to run fsc* on the root partition, the root partition must be mounted as
readonly
Jou cannot run fsc* on a partition that is mounted as readOwrite.
6n order to improve your system]s security you decide to implement shadow passwords. >hat command
should you use?
pwconv
!he pwconv command creates the file IetcIshadow and changes all passwords to ]x] in the IetcIpasswd file.
Nob Armstrong, who has a username of boba, calls to tell you he forgot his password. >hat command should
you use to reset his command?
passwd boba
!he passwd command is used to change your password. 6f you do not specify a username, your password will
be changed.
!he top utility can be used to change the priority of a running process? Another utility that can also be used to
change priority is <<<<<<<<<<<?
nice
Noth the top and nice utilities provide the capability to change the priority of a running process.
>hat command should you type to see all the files with an extension of ]mem] listed in reverse alphabetical
order in the IhomeIbenImemos directory.
ls Or IhomeIbenImemosIo.mem
!he Oc option used with ls results in the files being listed in chronological order. Jou can use wildcards with the
ls command to specify a pattern of filenames.
>hat file defines the levels of messages written to system log files?
*ernel.h
!o determine the various levels of messages that are defined on your system, examine the *ernel.h file.
>hat command is used to remove the password assigned to a group?
gpasswd Or
!he gpasswd command is used to change the password assigned to a group. Ase the Or option to remove the
password from the group.
>hat command would you type to use the cpio to create a bac*up called bac*up.cpio of all the users] home
directories?
find Ihome Y cpio Oo V bac*up.cpio
!he find command is used to create a list of the files and directories contained in home. !his list is then piped
to the cpio utility as a list of files to include and the output is saved to a file called bac*up.cpio.
>hat can you type at a command line to determine which shell you are using?
echo [:P$$
!he name and path to the shell you are using is saved to the :P$$ environment variable. Jou can then use
the echo command to print out the value of any variable by preceding the variable]s name with [. !herefore,
typing echo [:P$$ will display the name of your shell.
>hat type of local file server can you use to provide the distribution installation materials to the new machine
during a networ* installation?
AD 6netd
ND ;::!7B
"D B7:
BD 77!#
PD 7;:
P O Jou can use an 7;: server to provide the distribution installation materials to the machine on which you
are performing the installation. Answers a, b, c, and d are all valid items but none of them are file servers. 6netd
is the superdaemon which controls all intermittently used networ* services. !he ;::!7B is the $inux ;ile
:ystem :tandard. B7: provides domain name resolution, and 77!# is the transfer protocol for usenet news.
6f you type the command cat dog W V cat what would you see on your display? "hoose one:
a. Any error messages only.
b. !he contents of the file dog.
c. !he contents of the file dog and any error messages.
d. 7othing as all output is saved to the file cat.
d
>hen you use W V for redirection, it redirects both the standard output and standard error. !he output would be
saved to the file cat.
Jou are covering for another system administrator and one of the users as*s you to restore a file for him. Jou
locate the correct tarfile by chec*ing the bac*up log but do not *now how the directory structure was stored.
>hat command can you use to determine this?
"hoose one:
a. tar fx tarfile dirname
b. tar tvf tarfile filename
c. tar ctf tarfile
d. tar tvf tarfile
d
!he t switch will list the files contained in the tarfile. Asing the v modifier will display the stored directory
structure.
Jou have the Ivar directory on its own partition. Jou have run out of space. >hat should you do? "hoose one:
a. 'econfigure your system to not write to the log files.
b. Ase fips to enlarge the partition.
c. Belete all the log files.
d. Belete the partition and recreate it with a larger siRe.
d
!he only way to enlarge a partition is to delete it and recreate it. Jou will then have to restore the necessary
files from bac*up.
Jou have a new application on a "BO'&M that you wish to install. >hat should your first step be?
"hoose one:
a. 'ead the installation instructions on the "BO'&M.
b. Ase the mount command to mount your "BO'&M as readOwrite.
c. Ase the umount command to access your "BO'&M.
d. Ase the mount command to mount your "BO'&M as readOonly.
d
Nefore you can read any of the files contained on the "BO'&M, you must first mount the "BO'&M.
>hen you create a new partition, you need to designate its siRe by defining the starting and ending
<<<<<<<<<<<<<.
cylinders
>hen creating a new partition you must first specify its starting cylinder. Jou can then either specify its siRe or
the ending cylinder.
>hat *ey combination can you press to suspend a running job and place it in the bac*ground?
ctrlOR
Asing ctrlOR will suspend a job and put it in the bac*ground.
!he easiest, most basic form of bac*ing up a file is to <<<<< it to another location.
copy
!he easiest most basic form of bac*ing up a file is to ma*e a copy of that file to another location such as a
floppy dis*.
>hat type of server is used to remotely assign 6# addresses to machines during the installation process?
AD :MN
ND 7;:
"D B"#
BD ;!
PD !!#
" O Jou can use a B"# server to assign 6# addresses to individual machines during the installation process.
Answers a, b, d, and e list legitimate $inux servers, but these servers do not provide 6# addresses. !he :MN,
or :amba, tool is used for file and print sharing across multiO&: networ*s. An 7;: server is for file sharing
across $inux netOwor*s. ;!# is a file storage server that allows people to browse and retrieve information by
logging in to it, and !!# is for the >eb.
>hich password pac*age should you install to ensure that the central password file couldn]t be stolen easily?
AD #AM
ND tcp<wrappers
"D shadow
BD securepass
PD ssh
" O !he shadow password pac*age moves the central password file to a more secure location. Answers a, b,
and e all point to valid pac*ages, but none of these places the password file in a more secure location. Answer
d points to an invalid pac*age.
>hen using useradd to create a new user account, which of the following tas*s is not done automatically.
"hoose one:
a. Assign a A6B.
b. Assign a default shell.
c. "reate the user]s home directory.
d. Befine the user]s home directory.
c
!he useradd command will use the system default for the user]s home directory. !he home directory is not
created, however, unless you use the Om option.
Jou want to enter a series of commands from the commandOline. >hat would be the Luic*est way to do this?
"hoose &ne
a. #ress enter after entering each command and its arguments
b. #ut them in a script and execute the script
c. :eparate each command with a semiOcolon C and press enter after the last command
d. :eparate each command with a I and press enter after the last command
c
!he semiOcolon may be used to tell the shell that you are entering multiple commands that should be executed
serially. 6f these were commands that you would freLuently want to run, then a script might be more efficient.
owever, to run these commands only once, enter the commands directly at the command line.
Jou attempt to use shadow passwords but are unsuccessful. >hat characteristic of the IetcIpasswd file may
cause this?
"hoose one:
a. !he login command is missing.
b. !he username is too long.
c. !he password field is blan*.
d. !he password field is prefaced by an asteris*.
c
!he password field must not be blan* before converting to shadow passwords.
>hen you install a new application, documentation on that application is also usually installed. >here would
you loo* for the documentation after installing an application called MyApp?
"hoose one:
a. IusrIMyApp
b. IlibIdocIMyApp
c. IusrIdocIMyApp
d. 6n the same directory where the application is installed.
c
!he default location for application documentation is in a directory named for the application in the IusrIdoc
directory.
>hat file would you edit in your home directory to change which window manager you want to use?
AD Sinit
ND .xinitrc
"D S;84:etup
BD xstart
PD xf84init
Answer: N O !he qI.xinitrc file allows you to set which window manOager you want to use when logging in to S
from that account.
Answers a, d, and e are all invalid files. Answer c is the main S server configuration file.
>hat command allows you to set a processorOintensive job to use less "#A time?
AD ps
ND nice
"D chps
BD less
PD more
Answer: N O !he nice command is used to change a job]s priority level, so that it runs slower or faster. Answers
a, d, and e are valid commands but are not used to change process information. Answer c is an invalid
command.
>hile logged on as a regular user, your boss calls up and wants you to create a new user account
immediately. ow can you do this without first having to close your wor*, log off and logon as root?
"hoose one:
a. 6ssue the command rootlog.
b. 6ssue the command su and type exit when finished.
c. 6ssue the command su and type logoff when finished.
d. 6ssue the command logon root and type exit when finished.
Answer: b
Jou can use the su command to imitate any user including root. Jou will be prompted for the password for the
root account. &nce you have provided it you are logged in as root and can do any administrative duties.
!here are seven fields in the IetcIpasswd file. >hich of the following lists all the fields in the correct order?
"hoose one:
a. username, A6B, G6B, home directory, command, comment
b. username, A6B, G6B, comment, home directory, command
c. A6B, username, G6B, home directory, comment, command
d. username, A6B, group name, G6B, home directory, comment
Answer: b
!he seven fields reLuired for each line in the IetcIpasswd file are username, A6B, G6B, comment, home
directory, command. Pach of these fields must be separated by a colon even if they are empty.
>hich of the following commands will show a list of the files in your home directory including hidden files and
the contents of all subdirectories?
"hoose one:
a. ls Oc home
b. ls Oa' IhomeIusername
c. ls Oa; IhomeIusername
d. ls Ol IhomeIusername
Answer: b
!he ls command is used to display a listing of files. !he Oa option will cause hidden files to be displayed as
well. !he O' option causes ls to recurse down the directory tree. All of this starts at your home directory.
6n order to prevent a user from logging in, you can add aCnD <<<<<<<<at the beginning of the password field.
Answer: asteric*
6f you add an asteric* at the beginning of the password field in the IetcIpasswd file, that user will not be able to
log in.
Jou have a directory called IhomeIbenImemos and want to move it to IhomeIbobImemos so you issue the
command mv IhomeIbenImemos IhomeIbob. >hat is the results of this action?
"hoose one:
a. !he files contained in IhomeIbenImemos are moved to the directory IhomeIbobImemosImemos.
b. !he files contained in IhomeIbenImemos are moved to the directory IhomeIbobImemos.
c. !he files contained in IhomeIbenImemos are moved to the directory IhomeIbobI.
d. !he command fails since a directory called memos already exists in the target directory.
Answer: a
>hen using the mv command to move a directory, if a directory of the same name exists then a subdirectory is
created for the files to be moved.
>hich of the following tas*s is not necessary when creating a new user by editing the IetcIpasswd file?
"hoose one:
a. "reate a lin* from the user]s home directory to the shell the user will use.
b. "reate the user]s home directory
c. Ase the passwd command to assign a password to the account.
d. Add the user to the specified group.
Answer: a
!here is no need to lin* the user]s home directory to the shell command. 'ather, the specified shell must be
present on your system.
Jou issue the following command useradd Om bobm Nut the user cannot logon. >hat is the problem?
"hoose one:
a. Jou need to assign a password to bobm]s account using the passwd command.
b. Jou need to create bobm]s home directory and set the appropriate permissions.
c. Jou need to edit the IetcIpasswd file and assign a shell for bobm]s account.
d. !he username must be at least five characters long.
Answer: a
!he useradd command does not assign a password to newly created accounts. Jou will still need to use the
passwd command to assign a password.
Jou wish to print the file vacations with 4= lines to a page. >hich of the following commands will accomplish
this? "hoose one:
a. pr Ol4= vacations Y lpr
b. pr Of vacations Y lpr
c. pr Om vacations Y lpr
d. pr Ol vacations Y lpr
Answer: a
!he default page length when using pr is 44 lines. !he Ol option is used to specify a different length.
>hich file defines all users on your system?
"hoose one:
a. IetcIpasswd
b. IetcIusers
c. IetcIpassword
d. IetcIuser.conf
Answer: a
!he IetcIpasswd file contains all the information on users who may log into your system. 6f a user account is
not contained in this file, then the user cannot log in.
>hich two commands can you use to delete directories?
AD rm
ND rm Orf
"D rmdir
BD rd
PD rd Orf
AnswerCsD: N, " O Jou can use rmdir or rm Orf to delete a directory. Answer a is incorrect, because the rm
command without any specific flags will not delete a directory, it will only delete files. Answers d and e point to
a nonOexistent command.
>hich partitioning tool is available in all distributions?
AD Bis* Bruid
ND fdis*
"D #artition Magic
BD ;A!%2
PD :ystem "ommander
AnswerCsD: N O !he fdis* partitioning tool is available in all $inux distributions. Answers a, c, and e all handle
partitioning, but do not come with all distributions. Bis* Bruid is made by 'ed at and used in its distribution
along with some derivatives. #artition Magic and :ystem "ommander are tools made by thirdOparty
companies. Answer d is not a tool, but a file system type. :pecifically, ;A!%2 is the file system type used in
>indows 98.
>hich partitions might you create on the mail server]s hard driveCsD other than the root, swap, and boot
partitions?
g"hoose all correct answersh
AD IvarIspool
ND Itmp
"D Iproc
BD Ibin
PD Ihome
AnswerCsD: A, N, P O :eparating IvarIspool onto its own partition helps to ensure that if something goes wrong
with the mail server or spool, the output cannot overrun the file system. #utting Itmp on its own partition
prevents either software or user items in the Itmp directory from overrunning the file system. #lacing Ihome off
on its own is mostly useful for system reOinstalls or upgrades, allowing you to not have to wipe the Ihome
hierarchy along with other areas. Answers c and d are not possible, as the Iproc portion of the file system is
virtualOheld in 'AMOnot placed on the hard drives, and the Ibin hierarchy is necessary for basic system
functionality and, therefore, not one that you can place on a different partition.
>hen planning your bac*up strategy you need to consider how often you will perform a bac*up, how much
time the bac*up ta*es and what media you will use. >hat other factor must you consider when planning your
bac*up strategy? <<<<<<<<<
what to bac*up
"hoosing which files to bac*up is the first step in planning your bac*up strategy.
>hat utility can you use to automate rotation of logs?
Answer: logrotate
!he logrotate command can be used to automate the rotation of various logs.
6n order to display the last five commands you have entered using the history command, you would type
<<<<<<<<<<< .
Answer: history +
!he history command displays the commands you have previously entered. Ny passing it an argument of +,
only the last five commands will be displayed.
>hat command can you use to review boot messages?
Answer: dmesg
!he dmesg command displays the system messages contained in the *ernel ring buffer. Ny using this
command immediately after booting your computer, you will see the boot messages.
>hat is the minimum number of partitions you need to install $inux?
Answer: 2
$inux can be installed on two partitions, one as I which will contain all files and a swap partition.
>hat is the name and path of the main system log?
Answer: IvarIlogImessages
Ny default, the main system log is IvarIlogImessages.
&f the following technologies, which is considered a clientOside script?
AD dava:cript
ND dava
"D A:#
BD "ee
Answer: A O dava:cript is the only clientOside script listed. dava and "ee are complete programming languages.
Active :erver #ages are parsed on the server with the results being sent to the client in !M$
1. Pvery command in $inux is a
answer : executable program
2. ow long can a filename in $inux be?
"orrect answer: 2++ characters
%. >hat is the shortcut to the login directory?
"orrect answer: cd e enter *ey
). !he hierarchy of a series of directories branching in a user system starts from
"orrect answer: Ihome
+. :aving open files, flush the system cache and other necessary system maintenance are allowed by.
"orrect answer: logging off the system
4. >hich directory contains configuration files that stores system and application setting?
"orrect answer: Ietc
5. >hich command is used to find data files, programs, directories that match the search argument?
"orrect answer: locate
8. Applications written to provide a GA6 shell for Anix and $inux are called
"orrect answer: x windows
9. !he advantage of using 7;: rather than :amba for file sharing in $inux is
"orrect answer: compatibility with >indows file sharing
1=. >hich framewor* is provided for the programs to interchange information about $inux &:?
"orrect answer: 'esource Befinition ;ramewor*
11. !o implement new application on 6NM RI1=. >hich of the following options need to be considered if it to be
implemented in $inux?
"orrect answer: 'ed at $inux does not support all the devices supported by 6NM RI&:
12. >hich of the following has greater mar*et share of $inux :>I> environment?
"orrect answer: $inux on R1=
1%. >hich of the following commands can be run to remove all the rules in an iptables table?
"orrect answer: iptables O;
1). >hich of the following is the NP:! way to set up ::C:ecure :hellD for communicating between :ystems without
needing passwords?
"orrect answer: Ase sshO*eygen for generating publicOprivate *eys.
1+. ow much usable space is available, when a $inux system is configured with a 'A6B + array that consists of six 2=
GN hard dis* drives?
"orrect answer: 1==Gb
;ormula: :oC7O1D
here :bsiRe
7bnumber of BB. remember it is only for 'A6B+
14. >hich of the following commands can be used to chec* for file corruption?
"orrect answer: md+sum
15. >hich of the following allows to secure remote command line access?
"orrect answer: ::C:ecure :hellD
18. >hich of the following supports for creating a $inux (#7 C(irtual #rivate 7etwor*D?
"orrect answer: %BP:
19. >hich of the following commands delete the files from the Itmp directory, issued by nonOroot user?
"orrect answer: su Oc arm Orf ItmpIoa
2=. >hich configuration does cardmgr read at $inux system startup?
"orrect answer: #"M"6A cards
21. >hen a computer system is reported problems with inodes and bloc*s, which of the following is the problem and its
solution to rectify it?
"orrect answer: !he file system has become corrupt and needs to be repaired.
22. >hich $inux command will successfully mounts a A:N drive?
"orrect answer: mount IdevIsda1 ImntIusb
2%. <<<<<<<<<<< is a common tool for determining services and ports running on a remote $inux.
"orrect answer: nmap
2). ;or supporting new dis*less client wor*stations, which of the following services needs to be installed on a server?
"orrect answer: #SP C#reboot eSecution PnvironmentD and tftpd
2+. >hich of the following will *ill the process 1=1= by an administratorClogged in as a standard userD? !he process 1=1=
was started by the root user.
"orrect answer: su Oc a*ill 1=1=a
24. >hich of the following $inux commands could be used to find what processor was detected on boot, when a laptop
system is slowI
"orrect answer: #&:!
25. ow to accomplish the $6$& boot configuration updation for supporting a newly installed 6BP hard drive?
"orrect answer: Pdit lilo.conf and run alilo Ov Ova
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
$inux :ystem Admin 6nterview `uestions W Answers part 2
1. >hich of the following below are true functionalities of Qernel?
answer: Allocates time and memory to programs
2. >hich of the following below are true functionalities of shell?
Answer: Authenticates user 6nterprets commands
%. >hich command is used to find what is in your home directory?
"orrect answer: T ls
). cd home to get bac* to your homeOdirectory?
answer: ;alse
+. >hich command is used to clear the screen?
"orrect Answer: "lear
4. !he head command writes the first <<<<<<<<<<<<< lines of a file to the screen.
answer: ten
5. >hat is used to search files for specified words or patterns?
answer: grep
8. V symbol is used to redirect the output of a command
answer: !rue
9. #ipe symbol is represented by
answer: Y
1=. >hich character is used to match exactly one character?
answer: ?
11. >hich command is used to see the online manual?
answer: man
12. A process is identified by a uniLue
answer: pid
1%. A process can run only in the bac*ground
Answer: !rue
1). >hich command reduces the siRe of a file?
answer: gRip
1+. ;ind command can search for?
nswer: ;iles
14. ow can we find the current value for shell variables?
answer: :et command
15. >hat is the difference between #A! and path?
answer: #A! and path specify directories to search for commands and programs
Noth variables always represent the same directory list
Altering either automatically causes the other to be changed
18. >hat is the default number of shell commands saved in the history list of .cshrc file?
"orrect answer: 2==
19. >hat is the difference between linux file system and windows file system?
answer: Ander >indows, the various partitions are detected at boot and assigned a drive letter whereas Ander $inux,
unless you mount a partition or a device, the system does not *now of the existence of that partition or device.
2=. >hat is the content of Ietc directory?
answer: it contains all configuration file
21. Itemp is a type of filesystem directory
answer: ;alse
22. !he basic function of <<<<<<<<<<<<<< is to search files for lines Cor other units of textD that contain a
answer: aw*
2%. >hich of the following below isIare true for Bate command?
answer: 6t can wor* wIo arguments
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
$inux :ystem Admin 6nterview `uestions W Answers part %
1. Pcho is used to Bisplay message on screen. >hich of the following options below should be used with echo to not
output the trailing newline?
answer: On
2. mount jr is used to mount a file in read only mode
answer: !rue
%. >hich command is most useful when you want not only to send some data down a pipe, but also to save a copy?
Answer: tee
). !here is no difference between who and whoami command?
"orrect answer: ;alse
+. >hen trying to compare two files using cmp, if the files differU what is the output?
answer: tells the first byte and line number where they differ
4. "al is used to display calendar. 6f no arguments are supplied, what is displayed?
answer: !he current month is displayed
5. >hich of the following command is used to test a networ* connection?
answer: ping
8. #ing will only report damaged pac*ets.
answer: ;alse
9. >hich of the following are valid functions of 'ed at #ac*age Manager?
Answer: Ased to verify software pac*ages.search engine to search for software@s
1=. >hat is the 7on interactive mode of nsloo*up used for?
answer: ;etch information about the specified host or domain
11. 7ettop is used to find networ* usage
Answer: !rue
12. 6n <<<<<<<<<<<<< state of a process, the process will be terminated and the information will still be available in the
process table.
Answer: \ombie
1%. >hich system call is used to bias the existing property of process?
answer: biasCD
1). $B<$6N'A'J<#A! is a type of
answer: Pnvironmental variable
1+. >hat is the major difference between A76S and $67AS?
answer: $inux is an open source and free software
14. >hat is the use of a pipe?
Answer: :everal functions can be combined in a single statement.:tream input to output.
15. Ny default, the shell uses the <<<<<<<<<<<<<<< library
answer: readline
18. !he *ernel cannot be updated.
answer: ;alse
19. >hich of the following below are types of shell?
answer: sh, shell
2=. !he <<<<<<<<<<<<<< file contains all the information of users on your system
Answer: IetcIpasswd
21. >hich directory is used to write messages when *ernel is loading? answer: IvarIlogImessages
22. >hich command is used to report on the status of the Luotas that have set including the amount of allocated space
and amount of used space?
answer: repLuota Oa
2%. $inux :upports (irtualiRed ;ile :ystems $i*e 'A6B.
answer: !rue
2). >hen $inux is installed, which account is created by default?
answer: 'oot
2+. Asing "M&B if we want to give A$$ permissions to a user, which mode is used?
answer: 555
24. >hy do we use pgrep command?
answer: !o search through the cur
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
$inux :ystem Admin 6nterview `uestions W Answers part )
1. >hat is the default A6B when we are creating first user.CuseraddD?
A: !he first user created by root will always have a A6B +==.
Aser 6Bbuid. !he uid of root is =.
A6B from 1 to )99 is reserved for system services such as tha user apache,nagios,etc.
2. ow many users are created by default.
A: Maximum usersb4=,=== by default.!his could be increased.
%. ;ields in password and shadow file.
A: #asswd file
'oot:x:=:=:=:root:Iroot:IbinIbash
Cusername: encrypted form of password: uid: gid: personal info: home dir:shellD
). >hen user is created which are the files it is updated.
A: IetcIpasswd j contains various pieces of information for each user account
IetcIshadow j contains the encrypted password information for user@s accounts and optional the password aging
information.
IetcIgshadow j group shadow file Ccontains the encrypted password for groupD
Ihome jAll users data is stored here.
IetcIlogin.defsOOO:hadow password suite configuration.
+. >hat is the owner of Itmp Cis stic*y bit applied on itD
A: drwxrwxrwt 11 root 2=)8= Apr 21 2%:25 tmp CyesD.
4. ow to chec* which *ernel module is installed?
A: modinfoOc
Also you can lo* for the modules at:
"ode:
IlibImodules
crpm jLa Y grep _*ernel
cuname jr
cuname jrsv
5. >hat are modules,advantages and disadvantages of modules.
A: Modules are nonOlin*ed drivers.
Ase of modules
Allow third party commercial development of drivers
Minimise *ernel siRe
Allow smaller generic *ernels
>hat is a Module
"ontains device specific system routines
;ills in nonOboot gaps in the *ernel
"an be loaded and removed dynamically
Modules 6n $inux
Modules are compiled per $inux release
Multiple modules live in
IlibImodulesII
ence only the active version modules will load
Accept parameters.
1+. ow to chec* which dis* is fault in hardware 'aid level
A: c watch catIprocImdstat O "hec* 'A6B status
cmdadm IdevImd1 jfailIaddIremove IdevIsda4 O ;or 'A6B partition fail,add W remove
A6S 6nterview `uestions and Answers
1 comment
by admin in A76S 6nterview Luestions and answers
6 collected some useful interview Luestions from various sites and 6 thought these Luestions might
help our readers or job see*ers to strength their *nowledge. Most of the Luestions are A6S, A"M#,
7etwor* related. Pnjoy.
Can you expIain the steps to Mirroring rootvg in your environment?
Mirroring 2rootvgZ protects the operating system from a dis* failure. Mirroring 2rootvgZ reLuires a
couple extra steps compared to other volume groups. !he mirrored rootvg dis* must be bootable
oando in the bootlist. &therwise, if the primary dis* fails, you@ll continue to run, but you won@t be able to
reboot.
6n brief, the procedure to mirror rootvg on hdis*= to hdis*1 is
1. Add hdis*1 to rootvg: extendvg rootvg hdis*1
2. Mirror rootvg to hdis*1: mirrorvg rootvg hdis*1 Cor smitty mirrorvgD
%. "reate boot images on hdis*1: bosboot Oad IdevIhdis*1
). Add hdis*1 to the bootlist:bootlist Om normal hdis*= hdis*1
+. 'eboot to disable Luorum chec*ing on rootvg. !he mirrorvg turns off Luorum by default, but the
system needs to be rebooted for it to ta*e effect.
What is VPN and how it works?
A (#7 is a private networ* that uses a public networ* Cusually the 6nternetD to connect remote sites or
users together. 6nstead of using a dedicated, realOworld connection such as leased line, a (#7 uses
2virtualZ connections routed rough the 6nternet from the company@s private networ* to the remote site
or employee.
What is daemon?
A daemon Cpronounced BPPOmuhnD is a program that runs continuously and exists for the purpose of
handling periodic service reLuests that a computer system expects to receive. !he daemon program
forwards the reLuests to other programs Cor processesD as appropriate. Pach server of pages on the
>eb has an HTTPD or ypertext !ransfer #rotocol daemon that continually waits for reLuests to
come in from >eb clients and their users.
!here are several daemon in A6S environment, such as, sshd, inetd, and so on.
Can you describe SAN in your won word?
A storage area networ* C:A7D is a highOspeed specialOpurpose networ* Cor subnetwor*D that
interconnects different *inds of data storage devices with associated data servers on behalf of a
larger networ* of users. !ypically, a storage area networ* is part of the overall networ* of computing
resources for an enterprise. A storage area networ* is usually clustered in close proximity to other
computing resources such as 6NM #ower+ boxes but may also extend to remote locations for bac*up
and archival storage, using wide area networ* carrier technologies such as A!M or :&7P! .
A storage area networ* can use existing communication technology such as 6NM@s optical fiber
P:"&7 or it may use the newer ;ibre "hannel technology. :ome :A7 system integrators li*en it to
the common storage bus Cflow of dataD in a personal computer that is shared by different *inds of
storage devices such as a hard dis* or a "BO'&M player.
:A7s support dis* mirroring, bac*up and restore, archival and retrieval of archived data, data
migration from one storage device to another, and the sharing of data among different servers in a
networ*. :A7s can incorporate subnetwor*s with networ*Oattached storage C7A:D systems.
So you mention NAS, but What is NAS?
7etwor*Oattached storage C7A:D is hard dis* storage that is set up with its own networ* address
rather than being attached to the department computer that is serving applications to a networ*@s
wor*station users. Ny removing storage access and its management from the department server,
both application programming and files can be served faster because they are not competing for the
same processor resources. !he networ*Oattached storage device is attached to a local area networ*
Ctypically, an Pthernet networ*D and assigned an 6# address. ;ile reLuests are mapped by the main
server to the 7A: file server.
7etwor*Oattached storage consists of hard dis* storage, including multiOdis* 'A6B systems, and
software for configuring and mapping file locations to the networ*Oattached device. 7etwor*Oattached
storage can be a step toward and included as part of a more sophisticated storage system *nown as
a storage area networ* C:A7D.
7A: software can usually handle a number of networ* protocols, including Microsoft@s 6nternetwor*
#ac*et Pxchange and 7etNPA6, 7ovell@s 7etware 6nternetwor* #ac*et Pxchange, and :un
Microsystems@ 7etwor* ;ile :ystem. "onfiguration, including the setting of user access priorities, is
usually possible using a >eb browser.
What is SMTP and how it works?
:M!# C:imple Mail !ransfer #rotocolD is a !"#I6# protocol used in sending and receiving eOmail.
owever, since it is limited in its ability to Lueue messages at the receiving end, it is usually used with
one of two other protocols, #&#% or 6MA#, that let the user save messages in a server mailbox and
download them periodically from the server. 6n other words, users typically use a program that uses
:M!# for sending eOmail and either #&#% or 6MA# for receiving eOmail. &n AnixObased systems,
sendmail is the most widelyOused :M!# server for eOmail. A commercial pac*age, :endmail, includes
a #&#% server. Microsoft Pxchange includes an :M!# server and can also be set up to include
#&#% support.
:M!# usually is implemented to operate over 6nternet port 2+.
Do you have any idea about NAT?
:hort for Network Addre Tranlation! an 6nternet standard that enables a localOarea networ* C$A7D
to use one set of 6# addresses for internal traffic and a second set of addresses for external traffic. A
NAT "ox located where the $A7 meets the 6nternet ma*es all necessary 6# address translations.
7A! serves three main purposes:
#rovides a type of firewall by hiding internal 6# addresses
Pnables a company to use more internal 6# addresses. :ince they@re used internally only, there@s no
possibility of conflict with 6# addresses used by other companies and organiRations.
Allows a company to combine multiple 6:B7 connections into a single 6nternet connection.
ExpIain DHCP and its uses to an environment?
:hort for Dynamic Hot #on$iguration Protocol! a protocol for assigning dynamic 6# addresses to
devices on a networ*. >ith dynamic addressing, a device can have a different 6# address every time
it connects to the networ*. 6n some systems, the device@s 6# address can even change while it is still
connected. B"# also supports a mix of static and dynamic 6# addresses.
Bynamic addressing simplifies networ* administration because the software *eeps trac* of 6#
addresses rather than reLuiring an administrator to manage the tas*. !his means that a new
computer can be added to a networ* without the hassle of manually assigning it a uniLue 6# address.
Many 6:#s use dynamic 6# addressing for dialOup users.
What does SNMP stands for?
:hort for Simple Network %anagement Protocol! a set of protocols for managing complex networ*s.
:7M# wor*s by sending messages, called #rotocol Bata Anits, to different parts of a networ*.
:7M#Ocompliant devices, called Agents, store data about themselves in Management 6nformation
Nases and return this data to the :7M# reLuesters.
What do you know about TCPDump?
!"#dump is a common computer networ* debugging tool that runs under the command line. 6t allows
the user to intercept and display !"#I6# and other pac*ets being transmitted or received over a
networ* to which the computer is attached. !cpdump wor*s on most AnixOli*e platforms: $inux,
:olaris, N:B, Mac &: S, #OAS and A6S among others. &n >indows, >inBump can be usedU it@s a
port of tcpdump to >indows.
Jou must have a root or super user authority to use !"#dumps in A76S li*e envrionment.
How do I remove a voIume group with no disks?
!his is a very common Luestion about A6S $(M and 6 *new that you will as* me this one. >ithin a
volume group there is a (olume Group Bescriptor Area C(GBAD which is *inda a 2suitcaseZ of lvm
information. !his is what allows you to pic* up your drives and ta*e them to another machine,
importvg them, and get filesystems automatically defined.
>hat happens, when you importvg the volume group, the command goes out and reads the (GBA
and finds out about all the logical volumes and filesystems that may exist on the
volume group. 6t then chec*s for clashes Cname conflicts, etc..D on its own machine and then,
populates its own database with information about the new volume group and
its associated logical volumes. 6n cases of file systems, it will go into the IetcIfilesystems file and add
the new filesystem entries that came along with the imported volume group.
!he main Luestion 6 see is 26@ve ta*en away the dis*s, but how do 6 get rid of the volume groupZ. !he
Luestion should really say, 2ow do 6 get rid of the volume group 67;&'MA!6&7Z since that@s all you
have on the system. Jou@ve got possible entries in
the IetcIfilesystems and definitely entries in the &BM. dust do:
exportvg
6t does a reverse importvg, except it doesn@t go off and read the (GBA. 6t nu*es anything relating to
the volume group in the IetcIfilesystems and &BM. !he only time this won@t wor* is if the system
detects that the volume group is varied on. !hen, it would be li*e trying to change tires on a moving
car, we won@t let you do itk
How do you you get rid of a disk that is no Ionger reaIIy in the VG?
6n this case, you B&7@! want to do an exportvg. >hat you want to do is tell the system you want to
cut out the memory of the old, bad dis* from the ':I4=== A7B from the (GBA of the volume group.
Jou simply do: reducevg Od Of
or if the hdname can@t be found:
reducevg Od Of
Ne careful with this command. Anli*e the exportvg command, actions done
with this command >6$$ affect the (GBA information on the platter.
What is Capacity on Demand?
"apacity on Bemand C"oBD encompasses the various capabilities for you to dynamically activate one
or more resources on your server as your business pea*s dictate. Jou can activate inactive
processors or memory units that are already installed on your server on a temporary and permanent
basis.
Asually, the "apacity on Bemand is used for 6NM :ystem i+r and e:erverr i+ and 6NM :ystem
p+r and e:erver p+ +2=, ++=, +5=, +9=, and +9+ models. :ome servers include a number of active
and inactive resources. Active processors and active memory units are resources that are available
for use on your server when it comes from the manufacturer. 6nactive processors and inactive
memory units are resources that are included with your server but are not available for use until you
activate them.
What is Hardware Management ConsoIe (HMC)?
!he M" is a server or stand alone machine that provides a graphical user interface tool to manage
several #ower :ystems. !he M" manages system through hypervisor and operating system. ;rom
version 5 it is truly web based and you can configure, installs and manage, partitioned, virtualiRation
most of your #ower+ and 4 boxes via M". !here are many tas*s you can do with M", such as,
#owering off and on of the partition
"onfigure and activate resources to the system
"reates and stores $#A' profiles and allocated resources to them.
M" do the dynamic memory reconfiguration of the partition.
:etup (6& server and (6& client thru M" and do microOpartition, create storage
pool and processor pool with it
#rovide virtual console to the partition
Most of the time we installed dual M" for redundancy and ma*e sure to achieve more uptime in a
wide system
Why do I need a Hardware Management ConsoIe, anyway?
Jou need a M" if you plan to:
j "onfigure and manage logical partitions and partition profiles Cselected models can configure
$67AS partitions without a M"D.
j #erform B$#A' Cdynamic $#A'D functions.
j Activate and manage "apacity on Bemand resources.
Jou can also use the M" to:
j #erform service functions
j Manage frames CtowersD, 6&#s and 6&As. o 7ote that you cannot see below the 6&A to the device
level.
j Manage system profiles Cyes, you can have more than onekD
j #ower on and power down. !he :ervice #rocessor is always hot if there is power to the server.
j Activate and manage (irtualiRation Pngine technologies.
j +2+= emulation so you can get a console up on a i+I&: partition or a virtual terminal window for A6S
or $67AS.
What is kerneI?
!he *ernel is the essential center of a computer operating system, the core that provides basic
services for all other parts of the operating system. A synonym is nucleu. A *ernel can be contrasted
with a shell, the outermost part of an operating system that interacts with user commands. Kernel and
hell are terms used more freLuently in A76S operating systems than in 6NM mainframe or Microsoft
>indows systems.
!ypically, a *ernel Cor any comparable center of an operating systemD includes an interrupt handler
that handles all reLuests or completed 6I& operations that compete for the *ernel@s services, a
scheduler that determines which programs share the *ernel@s processing time in what order, and a
supervisor that actually gives use of the computer to each process when it is scheduled. A *ernel may
also include a manager of the operating system@s address spaces in memory or storage, sharing
these among all components and other users of the *ernel@s services. A *ernel@s services are
reLuested by other parts of the operating system or by application programs through a specified set
of program interfaces sometimes *nown as system calls.
What is RMC?
!he 'esource Monitoring and "ontrol C'M"D subsystem is the scalable bac*bone of ':"! that
provides a generaliRed framewor* for managing resources within a single system or a cluster. 6ts
generaliRed framewor* is used by cluster management tools to monitor, Luery, modify, and control
cluster resources. 'M" provides a single monitoring and management infrastructure for both ':"!
peer domains and management domains. 'M" can also be used on a single machine, enabling you
to monitor and manage the resources of that machine. owever, when a group of machines, each
running 'M", are clustered together, the 'M" framewor* allows a process on any node to perform
an operation on one or more reource on any other node in the domain.
What information is stored in Object Data Manager?
6t is a database of system and device configuration information integrated into 6NM@s A6S operating
system. !he &BM is uniLue to A6S compared to other A76S operating systems.
Pxample of information stored in the &BM database are:
7etwor* configuration
$ogical volume management configuration
6nstalled software information
Bevices that A6S has drivers for
$ogical devices or software drivers
#hysical hardware device installed
Menus, screens and commands that :M6! uses
ExpIain a IittIe about VitaI Product Data (VPD)?
(#B in A6S and $inux is a collection of configuration and informational data associated with a
particular set of hardware or software. (#B refers to a subset of database tables in the &bject Bata
Manager C&BMD, !herefore the (#B and &BM terms are sometimes referred to interchangeably.
(ital product data C(#BD stores information such as part numbers, serial numbers, and engineering
change levels from the "ustomiRed (#B object class or platform specific areas, not all devices
contain (#B data.
Does HACMP work on different operating systems?
Jes. A"M# is tightly integrated with the A6S +$ operating system and :ystem p servers allowing for
a rich set of features which are not available with any other combination of operating system and
hardware. A"M# (+ introduces support for the $inux operating system on #&>P' servers.
A"M# for $inux supports a subset of the features available on A6S +$, however this mutliOplatform
support provides a common availability infrastructure for your entire enterprise.
What appIications work with HACMP?
All popular applications wor* with A"M# including BN2, &racle, :A#, >eb:phere, etc. A"M#
provides :mart Assist agents to let you Luic*ly and easily configure A"M# with specific
applications. A"M# includes flexible configuration parameters that let you easily set it up for just
about any application there is.
Does HACMP support dynamic LPAR, CUoD, On/Off CoD, or CBU?
A"M# supports Bynamic $ogical #artitioning, "apacity Apgrade on Bemand, &nI&ff "apacity on
Bemand and "apacity Nac*up Apgrade.
If a server has LPAR capabiIity, can two or more LPARs be configured with unique instances
of HACMP running on them without incurring additionaI Iicense charges?
Jes. A"M# is a server product that has one charge unit: number of processors on which A"M#
will be installed or run. 'egardless of how many $#A's or instances of A6S +$ that run in the server,
you are charged based on the number of active processors in the server that is running A"M#. 7ote
that A"M# configurations containing multiple $#A's within a single server may represent a
potential single pointOofOfailure. !o avoid this, it is recommended that the bac*up for an $#A' be an
$#A' on a different server or a standalone server.
Does HACMP support non-IBM hardware or operating systems?
Jes. A"M# for A6S +$ supports the hardware and operating systems as specified in the manual
where A"M# (+.) includes support for 'ed at and :A:P $inux.
What is nmon tooI do?
!he nmon tool is designed for A6S and $inux performance specialists to use for monitoring and
analyRing performance data, including:
"#A utiliRation
Memory use
Qernel statistics and run Lueue information
Bis*s 6I& rates, transfers, and readIwrite ratios
;ree space on file systems
Bis* adapters
7etwor* 6I& rates, transfers, and readIwrite ratios
#aging space and paging rates
"#A and A6S specification
!op processors
6NM !!# >eb cache
AserOdefined dis* groups
Machine details and resources
Asynchronous 6I& s A6S only
>or*load Manager C>$MD s A6S only
6NM !otal:toraget Pnterprise :torage :ervert CP::D dis*s s A6S only
7etwor* ;ile :ystem C7;:D
Bynamic $#A' CB$#A'D changes s only p:eries p+ and &pen#ower for either A6S or $inux
Also included is a new tool to generate graphs from the nmon output and create .gif files that can be
displayed on a >eb site.
What is LogicaI VoIume Manager(LVM) means?
!he set of operating system commands, library subroutines and other tools that allow you to establish
and control logical volume storage is called the $ogical (olume Manager C$(MD.
What is a LogicaI partition?
A logical partition C$#A'D is the division of a computer@s processors, memory, and hardware
resources into multiple environments so that each environment can be operated independently with
its own operating system and applications.
ExpIain Network FiIe Systems(NFS)?
!he 7etwor* ;ile :ystem C7;:D is a distributed file system that allows users to access files and
directories of remote servers as if they were local. :uppose,
:erver A, that ma*es its file systems, directories, and other resources available for remote access.
"lient@s computers, or their processes, that use a server@s resources.
Pxport the act of ma*ing file systems available to remote clients.
Mount the act of a client accessing the file systems that a server exports.
What is Network Information Service (NIS)?
76: was developed to simplify the tas* of administrating a number of machines over a networ*. 6n
particular was the reLuirement to maintain copies of common files Ce.g. password, group and hostD
across different systems.
What is software RAID LeveIs do?
'edundant Arrays of 6ndependent Bis*s C'A6BD is formally defined as a method to store data on any
type of dis* medium.
LDAP
!he $ight Birectory Access #rotocol C$BA#D defines a standard method for accessing and updating
information in a directory Ca databaseD either locally or remotely in a clientOserver model.
Can you describe SAN in your won word?
A storage area networ* C:A7D is a highOspeed specialOpurpose networ* Cor subnetwor*D that
interconnects different *inds of data storage devices with associated data servers on behalf of a
larger networ* of users. !ypically, a storage area networ* is part of the overall networ* of computing
resources for an enterprise. A storage area networ* is usually clustered in close proximity to other
computing resources such as 6NM #ower+ boxes but may also extend to remote locations for bac*up
and archival storage, using wide area networ* carrier technologies such as A!M or :&7P! .
A storage area networ* can use existing communication technology such as 6NM@s optical fiber
ESCON or it may use the newer ;ibre "hannel technology. :ome SAN system integrators li*en it to
the common storage bus Cflow of dataD in a personal computer that is shared by different *inds of
storage devices such as a hard dis* or a "BO'&M player.
:A7s support dis* mirroring, bac*up and restore, archival and retrieval of archived data, data
migration from one storage device to another, and the sharing of data among different servers in a
networ*. :A7s can incorporate subnetwor*s with networ*Oattached storage C7A:D systems.
So you mention NAS, but What is NAS?
7etwor*Oattached storage CNASD is hard dis* storage that is set up with its own networ* address
rather than being attached to the department computer that is serving applications to a networ*@s
wor*station users. Ny removing storage access and its management from the department server,
both application programming and files can be served faster because they are not competing for the
same processor resources. !he networ*Oattached storage device is attached to a local area networ*
Ctypically, an Pthernet networ*D and assigned an 6# address. ;ile reLuests are mapped by the main
server to the 7A: file server.
7etwor*Oattached storage consists of hard dis* storage, including multiOdis* 'A6B systems, and
software for configuring and mapping file locations to the networ*Oattached device. 7etwor*Oattached
storage can be a step toward and included as part of a more sophisticated storage system *nown as
a storage area networ* C:A7D.
7A: software can usually handle a number of networ* protocols, including Microsoft@s 6nternetwor*
#ac*et Pxchange and 7etNPA6, 7ovell@s 7etware 6nternetwor* #ac*et Pxchange, and :un
Microsystems@ 7etwor* ;ile :ystem. "onfiguration, including the setting of user access priorities, is
usually possible using a >eb browser.
What is SMTP and how it works?
:M!# C:imple Mail !ransfer #rotocolD is a !"#I6# protocol used in sending and receiving eOmail.
owever, since it is limited in its ability to Lueue messages at the receiving end, it is usually used with
one of two other protocols, #&#% or 6MA#, that let the user save messages in a server mailbox and
download them periodically from the server. 6n other words, users typically use a program that uses
:M!# for sending eOmail and either #&#% or 6MA# for receiving eOmail. &n AnixObased systems,
sendmail is the most widelyOused :M!# server for eOmail. A commercial pac*age, :endmail, includes
a #&#% server. Microsoft Pxchange includes an :M!# server and can also be set up to include
#&#% support.
:M!# usually is implemented to operate over 6nternet port 2+.
Do you have any idea about NAT?
:hort for Network Addre Tranlation! an 6nternet standard that enables a localOarea networ* C$A7D
to use one set of 6# addresses for internal traffic and a second set of addresses for external traffic.
A NAT "ox located where the $A7 meets the 6nternet ma*es all necessary 6# address translations.
7A! serves three main purposes:
#rovides a type of firewall by hiding internal 6# addresses
Pnables a company to use more internal 6# addresses. :ince they@re used internally
only, there@s no possibility of conflict with 6# addresses used by other companies and
organiRations.
Allows a company to combine multiple 6:B7 connections into a single 6nternet connection.
ExpIain DHCP and its uses to an environment?
:hort for Dynamic Hot #on$iguration Protocol! a protocol for assigning dynamic 6# addresses to
devices on a networ*. >ith dynamic addressing, a device can have a different 6# address every time
it connects to the networ*. 6n some systems, the device@s 6# address can even change while it is still
connected. B"# also supports a mix of static and dynamic 6# addresses.
Bynamic addressing simplifies networ* administration because the software *eeps trac* of 6#
addresses rather than reLuiring an administrator to manage the tas*. !his means that a new
computer can be added to a networ* without the hassle of manually assigning it a uniLue 6# address.
Many 6:#s use dynamic 6# addressing for dialOup users.
What does SNMP stands for?
:hort for Simple Network %anagement Protocol! a set of protocols for managing complex networ*s.
:7M# wor*s by sending messages, called #rotocol Bata Anits, to different parts of a networ*.
:7M#Ocompliant devices, called Agents, store data about themselves in Management 6nformation
Nases and return this data to the :7M# reLuesters.
What do you know about TCPDump?
!"#dump is a common computer networ* debugging tool that runs under the command line. 6t allows
the user to intercept and display !"#I6# and other pac*ets being transmitted or received over a
networ* to which the computer is attached. !cpdump wor*s on most AnixOli*e platforms: $inux,
:olaris, N:B, Mac &: S, #OAS and A6S among others. &n >indows, >inBump can be usedU it@s a
port of tcpdump to >indows.
Jou must have a root or super user authority to use !"#dumps in A76S li*e envrionment.
What is software RAID LeveIs do?
'edundant Arrays of 6ndependent Bis*s C'A6BD is formally defined as a method to store data on any
type of dis* medium.
LDAP
!he $ight Birectory Access #rotocol C$BA#D defines a standard method for accessing and updating
information in a directory Ca databaseD either locally or remotely in a clientOserver model.
What are the benefits of fibre channeI SANs?
;ibre "hannel :A7s are the de facto standard for storage networ*ing in the corporate data center
because they provide exceptional reliability, scalability, consolidation, and performance. ;ibre
"hannel :A7s provide significant advantages over directOattached storage through improved storage
utiliRation, higher data availability, reduced management costs, and highly scalable capacity and
performance.
What environment is most suitabIe for fibre channeI SANs?
!ypically, ;ibre "hannel :A7s are most suitable for large data centers running businessOcritical data,
as well as applications that reLuire highObandwidth performance such as medical imaging, streaming
media, and large databases. ;ibre "hannel :A7 solutions can easily scale to meet the most
demanding performance and availability reLuirements.
What customer probIems do fibre channeI SANs soIve?
!he increased performance of ;ibre "hannel enables a highly effective bac*up and recovery
approach, including $A7Ofree and serverOfree bac*up models. !he result is a faster, more scalable,
and more reliable bac*up and recovery solution. Ny providing flexible connectivity options and
resource sharing, ;ibre "hannel :A7s also greatly reduce the number of physical devices and
disparate systems that must be purchased and managed, which can dramatically lower capital
expenditures. eterogeneous :A7 management provides a single point of control for all devices on
the :A7, lowering costs and freeing personnel to do other tas*s.
How Iong has fibre channeI been around?
Bevelopment started in 1988, A7:6 standard approval occurred in 199), and large deployments
began in 1998. ;ibre "hannel is a mature, safe, and widely deployed solution for highOspeed C1 GN, 2
GN, ) GND communications and is the foundation for the majority of :A7 installations throughout the
world.
What is the future of fibre channeI SANs?
;ibre "hannel is a wellOestablished, widely deployed technology with a proven trac* record and a
very large installed base, particularly in highOperformance, businessOcritical data center environments.
;ibre "hannel :A7s continue to grow and will be enhanced for a long time to come. !he reduced
costs of ;ibre "hannel components, the availability of :A7 *its, and the next generation of ;ibre
"hannel C) GND are helping to fuel that growth. 6n addition, the ;ibre "hannel roadmap includes plans
to double performance every three years.
What are the benefits of 4gb fibre channeI?
Nenefits include twice the performance with little or no price increase, investment protection with
bac*ward compatibility to 2 GN, higher reliability due to fewer :A7 components Cswitch and NA
portsD reLuired, and the ability to replicate, bac* up, and restore data more Luic*ly. ) GN ;ibre
"hannel systems are ideally suited for applications that need to Luic*ly transfer large amounts of data
such as remote replication across a :A7, streaming video on demand, modeling and rendering, and
large databases. ) GN technology is shipping today.
How is fibre channeI different from ISCSI?
;ibre "hannel and i:":6 each have a distinct place in the 6! infrastructure as :A7 alternatives to
BA:. ;ibre "hannel generally provides high performance and high availability for businessOcritical
applications, usually in the corporate data center. 6n contrast, i:":6 is generally used to provide
:A7s for business applications in smaller regional or departmental data centers.
When shouId I depIoy fibre channeI instead of ISCSI?
;or environments consisting of highOend servers that reLuire high bandwidth or data center
environments with businessOcritical data, ;ibre "hannel is a better fit than i:":6. ;or environments
consisting of many midrange or lowOend servers, an 6# :A7 solution often delivers the most
appropriate priceIperformance.
Name some of the SAN topoIogies ?
#ointOtoOpoint, arbitrated loop, and switched fabric topologies.
Whats the need for separate network for storage why LAN cannot be used?
$A7 hardware and operating systems are geared to user traffic, and $A7s are tuned for a fast user
response to messaging reLuests.
>ith a :A7, the storage units can be secured separately from the servers and totally apart from the
user networ* enhancing storage access in data bloc*s Cbul* data transfersD, advantageous for serverO
less bac*ups.
What are the advantages of RAID?
2'edundant Array of 6nexpensive Bis*sZ
Bepending on how we configure the array, we can have the
O data mirrored g'A6B 1h Cduplicate copies on separate drivesD
O striped g'A6B =h Cinterleaved across several drivesD, or
O parity protected g'A6B +hCextra data written to identify errorsD.
!hese can be used in combination to deliver the balance of performance and reliability that the user
reLuires.
Define RAID? Which one you feeI is good choice?
'A6B C'edundant array of 6ndependent Bis*sD is a technology to achieve redundancy with faster 6I&.
!here are Many $evels of 'A6B to meet different needs of the customer which are: '=, '1, '%, '),
'+, '1=, '4.
Generally customer chooses '+ to achieve better redundancy and speed and it is cost effective.
'= j :triped set without parityIg7onO'edundant Arrayh.
#rovides improved performance and additional storage but no fault tolerance. Any dis* failure
destroys the array, which becomes more li*ely with more dis*s in the array. A single dis* failure
destroys the entire array because when data is written to a 'A6B = drive, the data is bro*en into
fragments. !he number of fragments is dictated by the number of dis*s in the drive. !he fragments
are written to their respective dis*s simultaneously on the same sector. !his allows smaller sections
of the entire chun* of data to be read off the drive in parallel, giving this type of arrangement huge
bandwidth. 'A6B = does not implement error chec*ing so any error is unrecoverable. More dis*s in
the array means higher bandwidth, but greater ris* of data loss
'1 j Mirrored set without parity.
#rovides fault tolerance from dis* errors and failure of all but one of the drives. 6ncreased read
performance occurs when using a multiOthreaded operating system that supports split see*s, very
small performance reduction when writing. Array continues to operate so long as at least one drive is
functioning. Asing 'A6B 1 with a separate controller for each dis* is sometimes called duplexing.
'% j :triped set with dedicated parityINit interleaved parity.
!his mechanism provides an improved performance and fault tolerance similar to 'A6B +, but with a
dedicated parity dis* rather than rotated parity stripes. !he single parity dis* is a bottleOnec* for
writing since every write reLuires updating the parity data. &ne minor benefit is the dedicated parity
dis* allows the parity drive to fail and operation will continue without parity or performance penalty.
') j Nloc* level parity.
6dentical to 'A6B %, but does bloc*Olevel striping instead of byteOlevel striping. 6n this setup, files can
be distributed between multiple dis*s. Pach dis* operates independently which allows 6I& reLuests to
be performed in parallel, though data transfer speeds can suffer due to the type of parity. !he error
detection is achieved through dedicated parity and is stored in a separate, single dis* unit.
'+ j :triped set with distributed parity.
Bistributed parity reLuires all drives but one to be present to operateU drive failure reLuires
replacement, but the array is not destroyed by a single drive failure. Apon drive failure, any
subseLuent reads can be calculated from the distributed parity such that the drive failure is mas*ed
from the end user. !he array will have data loss in the event of a second drive failure and is
vulnerable until the data that was on the failed drive is rebuilt onto a replacement drive.
'4 j :triped set with dual distributed #arity.
#rovides fault tolerance from two drive failuresU array continues to operate with up to two failed drives.
!his ma*es larger 'A6B groups more practical, especially for high availability systems. !his becomes
increasingly important because largeOcapacity drives lengthen the time needed to recover from the
failure of a single drive. :ingle parity 'A6B levels are vulnerable to data loss until the failed drive is
rebuilt: the larger the drive, the longer the rebuild will ta*e. Bual parity gives time to rebuild the array
without the data being at ris* if one drive, but no more, fails before the rebuild is complete.
What is the difference between RAID 0+1 and RAID 1+0?
'A6B =e1 CMirrored :trippedD
6n this 'A6B level all the data is saved on stripped volumes which are in turn mirrored, so any dis*
failure saves the data loss but it ma*es whole stripe unavailable. !he *ey difference from RAID 1e= is
that RAID =e1 creates a second striped set to mirror a primary striped set. !he array continues to
operate with one or more drives failed in the same mirror set, but if drives fail on both sides of the
mirror the data on the 'A6B system is lost. 6n this RAID level if one dis* is failed full mirror is mar*ed
as inactive and data is saved only one stripped volume.
RAID 1e= C:tripped MirroredD
6n this 'A6B level all the data is saved on mirrored volumes which are in turn stripped, so any dis*
failure saves data loss. !he *ey difference from RAID =e1 is that RAID 1e= creates a striped set from
a series of mirrored drives. 6n a failed dis* situation RAID 1e= performs better because all the
remaining dis*s continue to be used. !he array can sustain multiple drive losses so long as no mirror
loses both its drives.
!his RAID level is most preferred for high performance and high data protection because rebuilding
of RAID 1e= is less time consuming in comparison to RAID =e1.
When JBODs are used?
2dust a Nunch of Bis*sZ
6t is a collection of dis*s that share a common connection to the server, but don@t include the
mirroring,
striping, or parity facilities that RAID systems do, but these capabilities are available with hostObased
software.
Differentiate RAID & JBOD?
'A6B: 2'edundant Array of 6nexpensive Bis*sZ
;aultOtolerant grouping of dis*s that server sees as a single dis* volume
"ombination of parityOchec*ing, mirroring, striping
:elfOcontained, manageable unit of storage
dN&B: 2dust a Nunch of Bis*sZ
Brives independently attached to the 6I& channel
:calable, but reLuires server to manage multiple volumes
Bo not provide protection in case of drive failure
What is a HBA?
ost bus adapters CNAsD are needed to connect the server ChostD to the storage.
What are the advantages of SAN?
Massively extended scalability.
Greatly enhanced device connectivity.
:torage consolidation.
$A7Ofree bac*up.
:erverOless CactiveOfabricD bac*up.
:erver clustering.
eterogeneous data sharing.
Bisaster recovery j 'emote mirroring.
>hile answering people do 7&! portray clearly what they mean W what advantages each of them
have, which are cost effective W which are to be used for the client@s reLuirements.
What is the difference b/w SAN and NAS?
!he basic difference between :A7 and 7A:, :A7 is ;abric based and 7A: is Pthernet based.
:A7 j :torage Area 7etwor*
6t accesses data on bloc* level and produces space to host in form of dis*.
7A: j 7etwor* attached :torage
6t accesses data on file level and produces space to host in form of shared networ* folder.
What is a typicaI storage area network consists of - if we consider it for impIementation in a
smaII business setup?
6f we consider any small business following are essentials components of :A7:
;abric :witch.
;" "ontrollers.
dN&B@s.
Can you briefIy expIain each of these Storage area components?
;abric :witch: 6t@s a device which interconnects multiple networ* devices .!here are switches starting
from 14 port to %2 ports which connect 14 or %2 machine nodes etc. vendors who manufacture these
*ind of switches are Nrocade, McBata.
What is the most criticaI component in SAN?
Pach component has its own criticality with respect to business needs of a company.
How is a SAN managed?
!here are many management software@s used for managing :A7@s to name a few:
:antricity.
6NM !ivoli :torage Manager.
"A Anicenter.
(eritas (olumemanger.
Which one is the DefauIt ID for SCSI HBA?
Generally the default 6B for :":6 NA is 5.
:":6O :mall "omputer :ystem 6nterface.
NA j ost Nus Adaptor.
What is the highest and Iowest priority of SCSI?
!here are 14 different 6B@s which can be assigned to :":6 device 5, 4, +, ), %, 2, 1, =, 1+, 1), 1%, 12,
11, 1=, 9, 8.
ighest priority of :":6 is 6B 5 and lowest 6B is 8.
How do you instaII device drivers for the HBA first time during OS instaIIation?
6n some scenarios you are supposed to install &perating :ystem on the drives connected thru :":6
NA or :":6 'A6B "ontrollers, but most of the &: will not be updated with drivers for those
controllers, that time you need to supply drivers externally, if you are installing windows, you need to
press ;4 during the installation of &: and provide the driver dis* or "B which came along with NA.
6f you are installing $inux you need to type 2linux ddZ for installing any driver.
What is Array?
Array is a group of 6ndependent physical dis*s to configure any (olumes or 'A6B volumes.
Can you describe at-Ieast 3 troubIeshooting scenarios which you have come across in detaiI?
SCENARIO 1: ow do you findIdebug when there is error while wor*ing :":6 devices?
6n our daily :A7 troubleshooting there are many management and configuration tools we use them to
see when there is a failure with target device or initiator device.
:ome time it is even hard to troubleshoot some of the things such as media errors in the drives, or
some of the drives ta*ing long time to spinOup. 6n such cases these utilities will not come to help. !o
debug this *ind of information most of the controller will be implemented with %Opin serial debug port.
>ith serial port debug connector cable you can collect the debug information with hyper terminal
software.
SCENARIO 2: 6 am having an issue with a controller its ta*ing lot of time to boot and detect all the
drives connected how can 6 solve this.?
!here are many possibilities that might cause this problem. &ne of the reason might be you are using
bad drives that cannot be repaired. 6n those cases you replace the dis*s with wor*ing ones.
Another reason might be slots you connected your controller to a slot which might not be supported.
!ry to connect with other types of slots.
&ne more probable reason is if you have flashed the firmware for different &PM@s on the same
hardware.
!o get rid of this the flash utilities will be having option to erase all the previous and PP#'&M and
boot bloc* entry option. Ase that option to rectify the problem.
SCENARIO 3: 6 am using tape drive series 5==S, even the vendor information on the !ape drive says
5==S, but the #&:! information while booting the server is showing as +==S what could be the
problem?
;irst you should ma*e sure your hardware is of which series, you can find out this in the product
website.
Generally you can see this because in most of the testing companies they use same hardware to test
different series of same hardware type. >hat they do is they flash the different series firmware. Jou
can always flash bac* to exact hardware type.
Which are the 4 types of SAN architecture types ?
"oreOedge.
;ullOMesh.
#artialOMesh.
"ascade.
Which command is used in Iinux to know the driver version of any hardware device?
dmesg.
How many minimum drives are required to create R5 (RAID 5)?
Jou need to have at least % dis* drives to create '+.
Can you name some of the states of RAID array?
!here are states of 'A6B arrays that represent the status of the 'A6B arrays which are given below:
&nline.
Begraded.
'ebuilding.
;ailed.
What are the protocoIs used in physicaI/dataIink and network Iayer of SAN?
Pthernet.
:":6.
;ibre "hannel.
What is storage virtuaIization?
:torage virtualiRation is amalgamation of multiple nIw storage devices into single storage unit.
Describe in brief the composition of FC Frame?
:tart of the ;rame locator
;rame header Cincludes destination id and source id, 2) bytesI4 wordsD.
Bata #ayload Cencapsulate :":6 instruction can be =O2112 bytes in lengthD.
"'" Cerror chec*ing, ) bytesD.
Pnd of ;rame C1 byteD.
What is virtuaIization?
(irtualiRation is logical representation of physical devices. 6t is the techniLue of managing and
presenting storage devices and resources functionally, regardless of their physical layout or location.
(irtualiRation is the pooling of physical storage from multiple networ* storage devices into what
appears to be a single storage device that is managed from a central console. :torage virtualiRation
is commonly used in a storage area networ* C:A7D. !he management of storage devices can be
tedious and timeOconsuming. :torage virtualiRation helps the storage administrator perform the tas*s
of bac*up, archiving, and recovery more easily, and in less time, by disguising the actual complexity
of the :A7.
What is HA?
A igh Availability is a technology to achieve failover with very less latency. 6ts a practical
reLuirement of data centers these days when customers expect the servers to be running 2) hours
on all 5 days around the whole %4+ days a year j usually referred as 2)x5x%4+. :o to achieve this, a
redundant infrastructure is created to ma*e sure if one database server or if one app server fails there
is a replica Batabase or Appserver ready to ta*eOover the operations. Pnd customer never
experiences any outage when there is a A networ* infrastructure.
Can you name some of the avaiIabIe tape media types?
!here are many types of tape media available to bac* up the data, some of them are:
DLT: Bigital $inear !ape j technology for tape bac*upIarchive of networ*s and serversU B$!
technology addresses midrange to highOend tape bac*up reLuirements.
LTO: $inear !ape &penU a new standard tape format developed by #, 6NM, and :eagate.
AIT: Advanced 6ntelligent !apeU a helical scan technology developed by :ony for tape bac*upIarchive
of networ*s and servers, specifically addressing midrange to highOend bac*up reLuirements.
Can we assign a hot spare to R0 (RAID 0) array?
7o, since '= is not redundant array, failure of any dis*s results in failure of the entire array so we
cannot rebuild the hot spare for the '= array.
Name the features of SCSI-3 standard?
QAS: `uic* arbitration and selection.
Bomain (alidation.
CRC: "yclic redundancy chec*.
What is MuItipath I/O?
;ault tolerant techniLue where, there is more than one physical path between the "#A in the
computer systems and its main storage devices through the buses, controllers, switches and other
bridge devices connecting them.
What is disk array?
:et of high performance storage dis*s that can store several terabytes of data. :ingle dis* array can
support multiple points of connection to the networ*.
What are different types of protocoIs used in transportation and session Iayers of SAN?
;ibre "hannel #rotocol C;"#D.
6nternet :":6 Ci:":6D.
;ibre "hannel 6# C;"6#D.
What is the type of Encoding used in Fibre ChanneI?
8bI1=b, as the encoding techniLue is able to detect all most all the bit errors
What are the main constrains of SCSI in storage networking?
Beployment distance Cmax. of 2+ mtsD.
7umber of devices that can be interconnected C14D.
What is a Fabric?
6nterconnection of ;ibre "hannel :witches.
What are the services provided by Fabric to aII the nodes?
1. ;abric $ogin.
2. :7:.
%. ;abric Address 7otification.
). 'egistered state change notification.
+. Nroadcast :ervers.
What is the difference between LUN and WWN?
$A7: AniLue number that is assigned to each storage device or partition of the storage that the
storage can support.
>>7: 4)bit address that is hard coded into a fibre channel NA and this is used to identify individual
port C7<#ort or ;<#ortD in the fabric.
What are the different topoIogies in Fibre ChanneI?
1. #ointOtoO#oint.
2. Arbitrary $oop.
%. :witched ;abric $oop.
What are the Iayers of Fibre ChanneI ProtocoI?
1. ;" #hysical Media.
2. ;" Pncoder and Becoder.
%. ;" ;raming and ;low control.
). ;" "ommon :ervices.
+. ;" Apper $evel #rotocol Mapping.
What is zoning?
;abric management service that can be used to create logical subsets of devices within a :A7. !his
enables portioning of resources for management and access control purpose.
What is the purpose of disk array?
#robability of unavailability of data stored on the dis* array due to single point failure is totally
eliminated.
How does FC Switch maintain the addresses?
;" :witch uses simple name server C:7:D to maintain the mapping table.
What are the two major cIassification of zoning?
!wo types of Roning are:
1. :oftware \oning.
2. ardware \oning.
What are different IeveIs of zoning?
1. #ort $evel Roning.
2. >>7 $evel Roning.
%. Bevice $evel Roning.
). #rotocol $evel Roning.
+. $A7 $evel Roning.
What are the 3 prominent characteristics of SAS ProtocoI?
1. 7ative "ommand `ueuing C7"`.D
2. #ort Multiplier.
%. #ort :elector.
What are the 5 states of Arbitrary Loop in FC?
1. $oop 6nitialiRation.
2. $oop Monitoring.
%. $oop arbitration.
). &pen $oop.
+. "lose $oop.
What is LUN Masking?
A method used to create an exclusive storage area and access control. And this can be achieved by
storage device control program.
What is snapshot?
A snapshot of data object contains an image of data at a particular point of time.
What is hot-swapping?
Bevices are allowed to be removed and inserted into a system without turning off the system.

6NM 6nterview `uestions
!hese are the interview Luestions which as*ed on 15O=)O=9 by 6NM intial round. &ne thing should remember by everyone,
now a days all the companies who are ta*ing >A: admins they are as*ing Luestions on &I: also, li*e $inux or A76S. :o
be prepare for those operating systems also before attending an interview.
1. !ell me about yourself Croles and responsibilitesD
2. >hat is the difference bIwn appserver and webserver?
%. ow do u configure the plugOin file?
). ow do u configure dBN" drivers and what is meant by d2" authentication?
+. ow 6nternet >or*s?
AD !he 6nternet is a global system of interconnected computer networ*s that use the standardiRed 6nternet #rotocol :uite
C!"#I6#D. 6t is a network o$ network that consists of millions of private and public, academic, business, and government
networ*s of local to global scope that are lin*ed by copper wires, fiberOoptic cables, wireless connections, and other
technologies.
4. Pxplain the process of ;ederation?
5.ow do u administrate admin console in unix?
8. what are the different types of clustering? done
9. >hat is the advantages of (ertical "lustering?
1=. Bo u have any idea or did u wor* with dA"$ scripts?
11. >here do you find the problems of a >ebserverC$og fileD?
12. ow many types of log files are therek >hat are theyk
1%. >hat is log rotation policy?
1). >here do you enable the Garbage "ollector?
using Overbosegc in startup command
1+. ow to tune an application?
14. >hen you will perform !hread Bump and eap Bump?
15. >hat are the parameters that to pass while generating an eap Bump?
18. ow !o identify that heap memory is decreasing and where?
19. Bescribe the real time problems that u faced in your administration career?
2=. >hat are the major tas*s you solved?
21. >hat is the difference between :: and ttps?
22. >hy we enable ::$ on webserver rather than App.:erver?
AD >hen ever reLuest comes to application it is start wor*ing from >ebserver.
::
:ecure :hell C::D, sometimes *nown as :ecure :oc*et :hell, is a AnixObased command interface and protocol for
securely getting access to a remote computer. 6t is widely used by networ* administrators to control >eb and other *inds
of servers remotely. :: is actually a suite of three utilities O slogin, ssh, and scp O that are secure versions of the earlier
A76S utilities, rlogin, rsh, and rcp. :: commands are encrypted and secure in several ways. Noth ends of the
clientIserver connection are authenticated using a digital certificate, and passwords are protected by being encrypted.
:: uses ':A public *ey cryptography for both connection and authentication. Pncryption algorithms include Nlowfish,
BP:, and 6BPA. 6BPA is the default.
::2, the latest version, is a proposed set of standards from the 6nternet Pngineering !as* ;orce C6P!;D.
ow !o "onnect !o >:admin "onsole through :&A# ?
Generally we connect wsadmin console directly with soap port or rmi port.
specially if we want to chec* whether a particular :&A# port of dmgr is wor*ing or not, this reLuisition we need whenever
we are federating a node to a dmgr.
!he following is the command which we use to chec* whether a particular port is communicating or not.
wsadmin Oconntype :&A# Oport 8859
wsadmin Oconntype 'M6 Oport 98=9
wsadmin Oconntype 'M6 Oport 28=9 Ouser u1 Opassword secret1
C1.1D 6ssues: we got responce from users saying that they not able to receive messages from their application.
:ol : we identified that message receiver server not able to recive messages from M`, because of ;ile storeage failed,
then we informed the same to system infrastructure team they added :A7, even though the problem not got resolved.
6 am seeing some transaction timeout errors in the logs:ccccX21OdulO2==9 14:18:2% o]cloc* N:!V X21cnedc%1%V
C1.2D 6ssues: dM: transaction timeout messages li*e this in >A:.
:ol: there are bul* number of dM: messages stored in M` :erver, when ever san got added at a time all the messages in
M`, hit the server at a time, so server is not able process that many number of reLuests at a time, then we increase the
d!A transaction time out value from %= to 1==, this will allow more time for transaction to complete. After process all the
reLuests we changed the transaction time out value bac* to %=.
C2.1D 6ssues: the >A: server logs are not getting generated in both the nodes. !he last timestamp in the logs file is
18I=5I=9 1+:%4.!he same issue has occurred few times and we have to restarted both the managed servers for the logs
to be generated.
"ould you please let us *now what could be the reason for this issue?
:ol. !he log rotation was not set properly, which 6 have set now. Also the log stopped in the middle of printing some
debugs, which suggests that it ran out of dis* space. !he I6NM<profile is mounted on root partition.
C%.1D "an you please send the #2 case C!AM !est !ool not wor*ingD which came today morning to A#$:A#+) and reLuest
them to chec* why the ?java.lang.&ut&fMemoryPrror: unable to create new native thread? occurred.
Also mention in that case that we had ta*en the thread dump and is present at mps location.
:ol. !his is again a native memory issue. !he d(M heap allocated is 1.+ Gb Cwhich is necessary otherwise app starts
giving heap errorsD, which leave +12mb for native memory out of the possible 2Gb max.
!his native memory is used by all the native modules li*e M` or application codes creating native memory. 6f the native
memory is not sufficient then you get &utofMemory:unable to create a new native thread error.
C).1D >e are facing problem with the >eb:phere server in dybip=). >e are using NPA version 8.1:#4
!he Managed server is suddenly going into A7Q7&>7 state and when we try to restart the server
!he following error is occurring::
&ut&fMemoryPrror occured on server
:ol. 6 have increased the memory siRe to 2GN and restarted the server. !he messages are being consumed now.
+.1D we are facing connection failure error, due to what causes?
:ol. ;inally we found, driver there is one BN driver corrupted in it causes the issue.
;irewarll OV loadbalancer OV >ebserver OV app.ser visa plugin OV hits application OV contact db to ds and
reLuest O V firewall OV loadbalancerCsplit the load into multiple >ebserverD OV CsitemiderIsslD webserver OV via plug in which
is in the application server OV application
6n side cluster jvm will respond.
ow much memory tuned for your application servers in your environment?
Bepend upon the application, decided by developer. &r depends on &:.
ow will you login to solarisI linux for installations?
7ormally we will not use rout privileged 6B for installingIconfiguring was applications in $inux.
Px: empid
:u wasuserCnot root privileged userD 7onOroute user
>hat are the two basic steps that admin have to do after deploying the application W before running the application?
have to regenerate the web server plugOin, copy it over to the web server machine and do a Luic* restart of it
1.wht is hot deployment, and where we get a chance to go for this?
ot deployment means adding modules or additional services to the existing application or new application without stopping the application server as
well as application. >hen an application is went to #roduction environment then we can]t stop the application as application reLuests will come. :o in
that case we will go for hot deployment.
2."an we access 2 different applications at once running on 2 application servers in a cluster?
6f those two applications are mapped exactly on to the same cluster members, we can access for them by configuring the webserver and plugOin properly
for the cluster.
%.how to enable Global :ecurity in >A: though "A6?
!o enable Global :ecurity first we have to do
1. :elect the Authentication 'egistry, i.e., either $ocal &: or $BA#.
ere we have to specify the primary administrative user name which should be present there in the registry.
2. :elect the Authentication Mechanism i.e., $!#A or :>AM.
ere we have to specify the password and confirmOpassword.
%. Pnable Global :ecurity.
). :ave and restart the server.
).6f the app server crashes in the middle of application deployment , wht could be the reason and wht steps we have to follow?
6f the server resources are less while deployment, when application reLuests are hitting application server due to less resources the application server
will crash. 6f the application server crash then that time we can get thread dump.
+.Buring >A: 7B installation, one default server aserver1a creates right?can we change its name during installation?
6f we are installing, in silent we can change the default server name we can change, in GA6 its not possible.
`: >hat is the default port for :: server?
A: 22
#osted by #onraj at 1:25 AM ) comments:
:N" 6nterview
!hese are the interview Luestions which are as*ed in :N".
1. >hat is davaNean?
AD A davaNean is a dava &bject that is serialiRable, has a nullary constructor, and allows access to properties using getter
and setter methods.
2. >hat is difference between soap.client.props and sas.client.props?
%. >hat is difference between normal d(M and >eb sphere d(M?
). >hat are the securities in >eb sphere?
+. >hat is BBIBeployment Bescriptor?
AD a deployment descriptor describes how a web application or enterprise application should be deployed. 6t directs a
deployment tool to deploy a module or application with specific container options, security settings and describes specific
configuration reLuirements
4. >hat is the deployment descriptor of PA'?
AD as below
5. >hat is the deployment descriptor of PdNI>A'?
AD ibmOwebObnd.xmi, ibmOwebOext.xmi, web.xml
8. ow do you pac*age applications?
9. >hat is difference between context root and urlOpattern?
1=. >or*load management
11. >hat is vertical and horiRontal scaling and their Advantages and BisOadvantages?
12. ow do you configure $BA# and >eb sphere?
1%. ow do you enable global security?
1). ow do you find memory lea*s? At what situation memory lea*s occur jGive any %
examples? 6s there any tool to find memory lea*s?
memory lea*s in hapen if objects not closing in java program
1+. ow do you enable verbose G"? 6n what file, the output is written?
14. >hen does G" cycle starts?
15. >hat is &ut&fMemory exception and when does it occur?
18. >hat are your BayOtoOBay Activities?
#osted by #onraj at 1:25 AM 7o comments:
6NM 67!P'(6P> `uestions on =)O=+O=9
1. !ell me about your educational bac*ground.
2. !ell me about your day to day activity.
%. what is load balancing?
AD Pdge component, N6G6# product hardware load balance.
6t will be connected to router and switches, >ebserver j to j app. server load balancer
). >hat is >or* $oad Management?
AD ;ailover, igh availability, scalability and security are coming from "lustering C>$MD.
!wo main features are O $oad Nalancing O Affinity>eb:phere >$M is offering these two features on different levels li*e O
ApplicationIweb :erver "lustering
+. what is meant by profile? ow many types of profiles are there in >as v4.=?
AD % types of profiles in 4.= 1.application server , 2. dmgr, %.default
in 4.1 there are ) j 1.dmgr, 2.app.serv, %.default,).cell profileCalready federated appserver profileD
4. how you fedarate a node from deployment manager? and how you federate when global security is enabled.?
AD we can federate it from console, need to select 7ode under system administration section, then select a new node
button then provide reLuiredCsoap portD data.
5. >hat is ::$ ? h&> Jou configure ::$?
AD 6t is Already been configured will use dummy, web server part, certificate, configure in that virtual host.
8. >hat is meant by oriRontal "lustering? Pxplain?
AD B&7P
9. ow to chec* dis* usage in linux or unix?
AD Bu O*
1=. ow to chec* the multiple 76" in Anix or linux?
AD ifconfig Oa
11. ow to identify and *ill a process 6B?
AD #s jef
12. >hat are the measures you follow while deploying an application in production environment?
AD we need to consider below steps.
1. need to ta*e necessary bac*ups, 2. 'aise a change reLuest, %. Approval reLuest, ). schedule date from change
control.
1%. what is the use of trace.log and activity.log?
AD we can use 2showlogZ commad in bin directory for getting tracer information.
!race.log : 6t will have details about the >A: Pnvironment, understandable text format.
Activity.log : 6t will have complete information about Application server environment, and it is not in readable format,
2waslogbr.batZ for openingIviewing this log. 6t will have information about complete base class and other stuff. >e have to
use 2symptom databaseZ for fixingIcompare identifying the issue.
1+. where do you get performance information in log files of an application server?
AD there are 2 logfiles
1. 7ativePrror.log j at what state the G" happened and how much memory freed up.
2. 7ative&ut.log j it is having general logs.
#osted by #onraj at 1:25 AM 7o comments:
6NM "hennai 6nterview
1. Are you responsible for production support?
AD Jes
As per on call support, we have dedicate mobile and laptop every wee*, they will change. And #rioritiRe, change at every
wee* on 2)x5 basis.
2. Nreifly explain about the topology of production environment?
AD
6n my production environment we are having 2== applications running across 5= 'P$ boxes in 2= >eb:phere cells.
Pach cell has % nodes under dmgr, all nodes are established in horiRontal cluster Cdifferent 'P$ boxesD, All clusters will
have % jvms run across the 'P$ boxes.
'esources: 8 onsite e 8 off shore
'ole hierarchy: Nusiness head OV 6! MG' OV Middleware mgr OV offOshore team lead OV
My role is $evelO1 and 2.
>e are did a migration from +.1 to 4.=I4.1, in my environment, +.1 will be completely migrated this year end. >e are using
paid support from 6NM +.1C% cellsD as free support stopped by 6NM.
%. >hich environment you are using?
AD :oloaris 4.1I8.x , 'P$ $inux: +.1
). ow many servers and how many applications?
AD Biscussed
+. which *ind of applications?
AD "lient Nusiness:
1. Mortgage, 2.!rading applications
4. Applications are running on clusters?
Jes.
5. ow do you verify that you are using oriRontal clusters not a vertical cluster?
AD if u have all the servers in same machineCostD ,than its vertical ,if cluster servers are installed in different machine
than its horiRontal.
O&'O
Go to >A: console bV select 7odes in left side bV in the right side of the console you can see how many nodes ma*e]s
your "P$$, and also the hostname of the boxes in which the node exists.
if you see all the nodes from different hostnames then its oriRontal clustering if you see same hostname here then its
(ertical clustering
8. your cluster contains how many nodes?
AD % nodes
9. Noth nodes are running on dmgr. Bmgr is on both nodes?
AD All my production Bmgr in a single box. 7odes will be across different boxes.
7ote: if in case failure of BMG' node, then how do we handle the issue?
6n that case we need to wait till that problem gets resolved, for any configuration changes in the console. Generally start
and stop server activities will do in application server node.
1=. 6s it necessary to have dmgr on both nodes?
AD 7&, :ingle dmgr.
11. Bo you have dmgr as standalone?
AD >e can, but 7o use.
12. "an we create more than one server in standaloneOenvironement?
AD 7ever wor*ed on stand alone environment.
1%. can we have more than one application in a single server?
AD many
1). 6 want to depoly the application in any one of the node but not cluster?
AD 7ode is a server
1+. >hat *ind of database you are using?
AD &racle 1=g
14. >hat *ind of security mode you are using or dBN" connection?
AD d2" Authentication
15. >hat type of driver you are using? !ype ) driver
AD
!ype 1 driver: dBN"O&BN" Nridge
!his driver called as dBN"O&BN" bridge.!he dava :tatements converts to dBN" statements.dBN" statements calls
&BN" by using dBN"O&BN" bridge. &BN" drivers convert into the reLuirements of databases.
davaOOOVdBN":tatOOVdBN"O&BN" bridgeOOV&BN"OOVBatabases.
!ype 2 driver: 7ativeOA#6Ipartly dava driver
!his driver is called as 7ative Briver where it reLuires the some native code to connect to the databases.
!ype % Briver: 7etOprotocolIallOdava driver
!his driver is called as #rotocal driver where
davaOOVdBN" statementsOOV:`$:tatementsOOV databases.
!ype ) Briver: !his driver directly converts the java statements to :`l :tatements which reLuire to databases. 6t wont
convert to dBN" statement.
18. !he application should be authenticate before interacting with database?
AD 6t will happened, we are creating uid, pwd that will wor*
19. what is meant by connection pooling?
AD a connection pool is a cache of database connections maintained by the database so that the connections can be
reused when the database receives future reLuests for data. "onnection pools are used to enhance the performance of
executing commands on a database. &pening and maintaining a database connection for each user, especially reLuests
made to a dynamic databaseOdriven website application, is costly and wastes resources. 6n connection pooling, after a
connection is created, it is placed in the pool and it is used over again so that a new connection does not have to be
established. 6f all the connections are being used, a new connection is made and is added to the pool. "onnection pooling
also cuts down on the amount of time a user must wait to establish a connection to the database.
2=. what are the different methods to deploy application?
AD
21. for ear file is context root is necessary?
AD ostname:9=89Iappname O context root Jes.
22. 6 updated the new application but the user is getting the old applicaion only?
AD need to 'estart, synch
2%. what are the options you have to improve performance?
AD "onnection pool, !hread pool of web container, PdN container, web server parameter, jdbc connection pool
!uning Application server
!uning d(M, !uning Applications, !uning Batabase, !uning dM:, !uning security, !uning operating systems, !uning >eb
servers
"onnection pool perameters:
[Admin"ontrol getAttribute [objectname surge"reation6nterval
[Admin"ontrol setAttribute [objectname surge"reation6nterval %=
[Admin"ontrol getAttribute [objectname surge!hreshold
[Admin"ontrol setAttribute [objectname surge!hreshold 1+
2). to sepcify the weight of a cluster member in which file i have to modify?
AD have to modify in #lugin file
2+. 6 am getting server +== erro, what will be the reason?
AD 6nternal server error Cserver to db middlewareD
24. ow do enable G"?
6n the Administrative "onsole, expand :ervers and then clic* on Application :ervers.
. "lic* on the server that is encountering the0 a&ut&fMemorya condition.
. &n the "onfiguration tab, under :erver0 6nfrastructure, expand dava and #rocess
Management, and clic* #rocess Befinition.
. Ander the Additional #roperties section, clic* dava (irtual0 Machine.
. :elect the (erbose garbage collection chec* box.0
. "lic*0 Apply.
. At the top of the Administrative "lient, clic* :ave to apply changes0 to the master
configuration.
. :top and restart the Application :erver
!he verbose garbage collection output is written to either native<stderr.log or
native<stdout.log for the Application :erver
verbosegc j !ells you what is being done, whether heap siRe is at min or max.
25. o to chec* G" is active or not, if you don]t have?
AD >e can chec* in logs.
28. can you tell me about profiles?
AD >eb:phere application binary, profile sharing binaries of existing instance,
29. what is the use of virtual host?
AD "onfiguration that lets a single host machine resemble multiple host machines. Pach virtual
host has a logical name and a list of one or more domain name system CB7:D aliases by which
it is *nown.
%=. 6s webserver W application server should be installed in a single machine or different machines?
AD >e can do it, but in production different machines.
>ebserver &: tuned in different way, app. server different way, normally these web servers in BM\ O BemilitariRed \one.
%1. Bifference between managed node and unmanaged node?
AD Managed have node agent, unmanaged not. Anmanaged node we not control from console.
%2. ow to chec* application servers are runningInot?
AD #s Ogrep
%%. ow to chec* >A: is running or not through #:?
AD #s Ogrep
>A: Pdge "omponents
!hese are the some of the >A: Pdge "omponents.
>A: Pdge "omponents
"aching #roxy
#roxy :erver
$oad Nalancer
7etwor* Bispatcher "omponent
"ontent Nased 'outing C"N'D
:ite :elector "omponent
#osted by #onraj at 1:24 AM 7o comments:
Narclays 6nterview
1. >hat is session affinity?
AD 6s nothing but a persistence.
Most servers use the term 2:ession AffinityZ to indicate that with in a cluster of servers, reLuests from the same client
always get routed bac* to same server. !his eliminates the need to replicate session data li*e !!# session or :tateful
session Neans.
2. d(M which has been clustered, the server is in production?
AD 1. Memory to memory replication 2. Batabase persistence
eartbeat mechanism wor* in a cluster, member of the cluster identifies that the other server is not responding it chec*s %
times for every 4= seconds, if not responded then it ta*es the configuration using memory replication process then
completes reLuest.
%. >hat is fix pac*?
AD #atches to fix a particular issue for a particular in environment only not other.
). >hat is patch?
AD 6t is li*e independent to every body, bug fix of >A:. >A: 4.1.=.15
+. >hat is migration? ow can you migrate from one version to another version?
AD discussed
+. ow can you disable the security without admin console?
AD we can disable in :ecurity.xml, but we can@t enable.
4. "omplete configureation steps for ::$?
AD >e have to install ibm http server, by using i*eyman tool we can create and use ::$ certificates.
5. ow to configure session management?
AD we can configure though console, either in applicationIdeployment descriptor.
8. ow can you provide security authentication for web server?
AD e!rust :iteMinder tool
9. ow to *now webserver version?
AD we can find in $ogfile.
1=. ow to identify old and new context roots?
AD in ttpd.conf file we can see commentedColdD and uncommentedCnewD data.
11. Bifference between v+ W v4.
AD
1. Multiple #rofile creations with a single installation CAll profiles share same >eb:phere binariesD
2. 6ntroduction of :ervice 6ntegration Nus C:6ND for messaging
%. as default dM: providers
). :upports mixed version nodes in a v4 7B "ell
+. as some extra addOons in the Admin console navigation tree
4. dA"$ has been deprecated in 4.1
12. >hat is the difference between >A: and >$?
AD
1. 6n weblogic u cant do clustering accros the domain,but in >ebsphere u can.
2. 6n weblogic all the configurations are stored in a single file called "onfig.xml ,but in >ebsphere its stored in a directory
structure called "P$$
%. 6n weblogic u can start the managed server without a AdminserverCusing M:6Oconfig.xmlD,in websphere u can not start a
node with out Bmgr.
). 6n websphere u can add webserver as a unmanaged node where as u cannnt do that in weblogic.
1%. ow many types of installation are there?
AD GA6, using 'esponse file Csilent modeD, command line .
1). dA"$ scripting? Alredy discussed
1+. 6f the performance, of the appliacation goes down? what will u do?
AD #erformance 6nformation should collect from monitoring tool
14. what is the difference between $1, $2, $%?
AD
l1O is basic level Cmonitoring, basic configurationD
l2 Obac* up who are senior staff Ctrouble shootingD
l% jarchitechts Cdesigning I architectI reLuirementCramIboxDD
15. the uesr submitted the reLuest, when that reLuest is on processing in the middle the server crashes then what
happens?
6t will lost.
#osted by #onraj at 1:24 AM 7o comments:
;riday, :eptember 1), 2==5
>ebsphere application server interview `uestions
ere is the major websphere application server interview Luestions collection and answer
>ells ;argo 14O=5O=9
1D >hat are your daily day to day Activates?
AD >e have tic*eting tools, >e have 2 !ype of tic*ets:
1. "hange reLuest : scheduled activities li*e new resources creation, d(M settings, "onfiguration of the application and
development teams raised tic*ets
2. 6ncident reLuest : production support or monitoring li*e up gradation.
>e have a dev teamU if they found any issues they will raise a tic*et.
>e have a production support team, and Monitoring team, if they come across some thing abnormal then they will raise a
production support tic*ets.
>e are having >A: +.1 and 4.1, so daily we are having configuration setups for migration, and building the similar
environment as +.1 in 4.16n different boxes as new environment.
'ight now 6 don@t have chance to write new scripts. ow to chec* thread dump in jacl
ow do you chec* the health of the appserver? 6s there any tool is avialable with you?
AD >e have monitoring tools, at the time issue only, !#( C!ivoli #erformance (iewerDI>illy 6ntroscope, and normally it is
disabled, at the time of performance issue only we will do monitoring.
2 *inds of monitoring: 1. Availability, 2. performance monitoring 2)I5 or not.
$1 team using :ite:cope: :ite:cope >eb:phere #erformance :ervlet Monitor to monitor the server statistics of 6NM >eb:phere :erver Cversions
%.=x, %.+, %.+.x, and ).=D via a >eb:phere #erformance :ervlet. !he error and warning thresholds for the monitor can be set on as many as ten
performance statistics.
%D "an u configure multpile apache webservers?
AD we can configure in httpd.conf file.
)D 6s it possible to configure 1= domain names in apache? if yes? ow?
AD we can use virtual hosts.
+D ow do you perform heap dump and thread dump?
AD Qill O% XV
eap dump relate to jvm memory usage,
!hread dump relate jvm thread usage
4D 6s *ill O%,*ill a process or create a thread dump? explaink
AD *ill O% is used create thread dump.
5D Bid u wor* with any tools which helps you to see the heap dump or thread dump?
AD eap dump jmap, 6NM heap analyRer tool, thread dump using 6NM thread analyRer Isamurai
8D ow to configure security and $BA#?
AD Global security,
:ecurity availability: 1. &: security 2. $BA# C%
rd
party securityD %. "ustom securityCApplication from BND
9D >hat are 2=2 errors?
Accepted.
1=D 6n ls Olrt, what t stands for and r stands for l stands for?
AD
Ol shows you huge amounts of information Cpermissions, owners, siRe, and when last modified.D
Or reverses the order of how the files are displayed.
Ot shows you the files in modification time
11D ow to chec* a particular port is wor*ing or not in unix?
AD netstat Oa Y grep 8=
#osted by #onraj at ):+= AM 7o comments:
Monday, duly =%, 2==4
6NM yderabad
1D!ellme About yourself?
AD >or*ed as a >ebsphere administrator. >as responsible for deploying, configuring,
tuning, clustering, and troubleshooting >eb:phere related issues.
2D"onfiguration of >eb:erver with App:erver?
AD !his configuration available in httpd.conf file of a web server, in this file we will configure virtual hosts and domains etc .
%D 'ole of #luginO"fg.xml?
AD >hen ever reLuest comes to >ebserver it identifies the app. server configuration in this configuration file.
)D !ell me about 'emote"onfiguration?
+D ow do you deploy an application in Admin"onsole?
4D ow do you deploy an PA' file in admin console?
5D >hat is meant by default bindings?
AD 6t will bind the resources to connectu.at time of startup
8D>hat are precompiled jsps?
9D Are you comfortable with M`?
AD 6 have a little bit *nowledge.
1=D!ell me about M`"onfiguration with >A:?
AD >e will configure from console, resources OV dM: OV `ueuesOV integrating with M`.
11D !ell me the command to find 'AM siRe in A6SIAnix?
AD prtconf only for A6S
12D"ommand to find dis*free space?
AD Bf j* or m
1%D how do you provide "ustom security?
AD Beveloper will give the authoriRation from an applicationCmay be uidIpwd from &racle BND
1)D:uppose if u enable customsecurity after opening the admin console in the rightside suppose if you got only 2 options
instead of % then what to do?
AD Luestion not clear
1+Dow much you are comfortable with scriptingCdA"$IdJ!&7D?
AD 6 have little bit *nowledge.
:et [
puts aAbout to dump threads for this jvm...a
[Admin"ontrol invo*e [jvm dump!hreads
puts a... donea
OOOOOOOOOOOO
6nvo*e the generateeapBump operation on a d(M MNean, for example,
;inding d(M object7ame:
set object7ame g[Admin"ontrol Luery7ames
>eb:phere:typebd(M,processbXer&ernameV,nodebXnodenameV,oh
6nvo*ing the generateeapBump operation on d(M MNean:
[Admin"ontrol invo*e [object7ame generateeapBump
Px: wsadmin Of test.py a b c
test.py content:
import sys
first b sys.argvg=h
second b sys.argvg1h
third b sys.argvg2h
arglen b lenCsys.argvD
14D6n dython script how to invo*e a variable which was defined in another jython script?
Asing MNeans
"alling scripts using another script
Ase the execfiIe command to call a dython script from another dython script. ;or example:
"reate a script called tet'(py that contains the following:
execfileC]c:ItempIscriptItest;unctions.py]D
print print7ameC]"athy], ]:mith]D
"reate a script called tet)unction(py that contains the following:
def print7ameCfirst, lastD:
name b first e ] ] e last
return name
!hen pass the following path as a script argument:
wsadmin Olang jython Of ]c:ItempIscriptItest1.py]
#osted by #onraj at 2:2) AM 7o comments:
SoIaris 10 Interview questions
May 1=, 2=1% in :olarisO6nterview `uestions
ere is the basic :olaris interview Luestions which are commonly as*ed in :olaris $1 or $2 C$evel 1 or $2D
interviews.6f you don@t have a :olaris setup to wor*,just install :olaris as guest operating system on (Mware
wor*stations and get a hands on experience.
Jou can also go through the below interface Luestions on specific category .
1.:olaris Rones 6nterview `uestions
2. \;: interview `uestions
%.(S(M 6nterview `uestions
).(eritas cluster 6nterview `uestions
+.'edhat $inux 6nterview `uestions
ExpIain the boot process of SoIaris operating system?
Noot process dived into ) phases.
1. #&:!
2. &N#'&M
%. QP'7P$ 676!6A$6\A!6&7
). 676! #A:P:
#&:!: #ower on self test, 6t will detect hardware, machine host 6B,serial 7o, architecture type, memory and
Pthernet address and it will load the primary program called bootbl*.

&N#: &pen boot programmable,
1.Biagnosing all the system hardware and memory.
2.6nitialiRing the boot parameter.
%."reating device trees and load the boot bloc* from C=O1+ sectorD, it is called as secondary boot
programmable ufsboot.

KERNEL INITIALIZATION: ufsboot load the *ernel Cgeneric unixD, *ernel will load all the necessary devices
modules to mount the root partition to continue the booting process.

6nit #hase : 6t will started by executing of IetcIinit program and start other process reading the
IetcIinittab files, as the directory in the IetcIinittab files.

What is the difference between init 1 and init s ?
6f you switch from multiuser mode to init s and switch it bac* to multiuser mode.then remote useres
automatically reconnects to the system.where as in the case of init 1. they have to reconnect manully means
they have to relogin
ExpIain about init phases
!here are 8 run level.
6nit=: :hutting down the system and bring bac* the system to &N# prompt C&QD
6nit1: :ingle user mode for administrative
6nit2: Multi user mode without resource sharing
6nit%: Multi user mode with resource sharing
6nit): 7ot in use
6nit+: :hutdown and power off the system
6nit4: 'eboot the system to default run level
6nits: :ingle user mode but user login are disabled

ExpIain rc script and run IeveI
'c script : chec* and mount the file system, start and stop the various process.
'un level: Nase on the init phases 8 run level

Which fiIe wiII take pIace whiIe booting.
c IetcIinittab

How many fiIe to modify the host name to be changed without rebooting the system.
!here are 4 files.
cvi IetcIhosts
cvi IetcInodename
cvi IetcIhostname.hme
cvi IetcInetIticltsIhosts
cvi IetcInetIticostsIhosts
cvi IetcInetIticotsordIhosts

Where the ip address wiII be stored
c IetcIhosts
c IetcIhosts.eLui
c IetcIhosts.hme

How to configure the network card
c ifconfig hme= plumb
c ifconfig hme= 192.9.2==.1= netmas* 2++.2++.2++.= up
c vi IetcIhosts C update the ip address D
c vi IetcIhosts.hme= C update the ip address D jV to bring the interface along with the ipaddress during boot
time.

How to configure the virtuaI ip address
6nfinity virtual ip address can be created.
c ifconfig hme=:1 plumb
c ifconfig hme=:1 192.9.2==.1= netmas* 2++.2++.2++.= up
c vi IetcIhosts C update the ip address D
c vi IetcIhosts.hme=:1 C update the ip address D jV to bring the interface along with the ipaddress during boot
time.

How to find the network card speed
c ndd jget IdevIhme lin*<speed
1 b 1==mbps
= b 1=mbps

How to modify network card speed
c ndd jset IdevIhme instance =
c ndd jget IdevIhme lin*<status
c ndd jget IdevIhme lin*<mode
!o modify
c ndd jset IdevIeri instance =
c ndd jset IdevIeri adv<1==!)<cap=
c ndd jset IdevIeri adv<1==fdx<cap1
c ndd jset IdevIeri adv<1==hdx<cap=
c ndd jset IdevIeri adv<1=fdx<cap=
c ndd jset IdevIeri adv<1=hdx<cap=
c ndd jset IdevIeri adv<autoneg<cap=

How to find the hardware configuration
&Q banner jV from the open boot prompt
c prtconf
c sysdef
c IusrIplatformIsun)uIsbinIprtdiag

How wiII you find the number of hard disk
c format
cdmesg jV this will not give the correct answer
csysdef
ciostat jPn jV it wont show the ;ibre channel
&Q showOdevs jV it will show the device scsi bus channel
&Q probeOscsiOall jV !his will detec* all the scsi bus channel, it will show "BO'&MIB(BO'&M also

Difference between probe-scsi-aII and probe-scsi
&Q probeOscsiOall: it will show all the scsi devices connected internal and external
&Q probeOscsi: it will show only internal scsi devices connected

Procedure for Firmware upgrade
:hutdown root cron on csslu%55 servers
c.IetcIinit.dIcron stop
'eset the system controller from the console.
c resetsc Oy
Apgrade the firmware on the system controller
V cd I11)+25O=)
V lom OG .Isgrtos.flash
V lom OG .Isgsc.flash
Pscape to lomV and reset the :":
lomV resetsc Oy
Apgrade the firmware on the system boards:
V lom OG .Ilw8cpu.flash
V lom OG .Ilw8pci.flash
:hutdown the &perating :ystem.
cshutdown ji= jg= jy
!his may ta*e a while for the server to come up
V poweroff
V poweron

Which fiIe to be configuring the Iogs messages (Iike: /var/adm/message etc.)
cIetcIsyslog.conf

Which fiIe maintain the kerneI
c IetcIpath<to<inst

!his will be Luite complicative, because *ernel is the core of the operating system, its an image of the &:.
whereas IetcIpath<to<inst are the drivers are stored for the enabled hardware.

How wiII see the kerneI version
&* banner jV !his will not show the Qernel
&* .version jV !his will tell the open boot prompt version otherwords, ;6'M>A'P
c prtconf j(
c showrev jV will show the installed patches
c uname jx

How wiII see the hostname
cnodename
chostname

How wiII compare 2 host patches
!hrough ftp copy the copied files nad use dd command to compare both the host patches.
use the command called 2diffZ
How wiII see the version of the patches
c showrev jp
c patchadd j#

How wiII check patches instaIIed
c showrev jp jV !his is the correct one
c patchadd j#
c patchrm : to remove the patch
c patchad jd Cpatch no D : to install the patch

How wiII you view the packages?
cp*ginfo Y more

When user Iogging in which fiIe wiII take pIace
.profiles

DefauIt path for patches
c IvarIsadmIpatch

How many fieIds in passwd, shadow and group fiIes
5 in#asswd: username:passwd:uid:gid:commentfiled:homedirectory:loginshell
9 in shadow: useraccount:passwd:lastchange:min:max:warring:inactivity:expiration:flag
) in group: username:passwd:gid:user

Syntax for useradd commad
c useradd ju 1=1 jg other jd IexportIhomeIragu jm js IbinI*sh jc 2revenueZ ragu

What is difference between g G whiIe creating useradd?
:mall 2gZ is primary group
"apital 2GZ is for secondary group

We have edit the /etc/passwd fiIe and modify a user forget to give the sheII wiII user abIe to Ioging?
6f #asswd jf option given 6n which files it will update.

How many fiIed in /etc/vfstab
5 fileds

After creating swap fiIe update the same to /etc/vfstab what wiII be the fstype.
tempfs

How wiII you cIear the soft error on disk
c format v analyst W verify v read Iwrite

How to modify the user from ragu to haz
c usermod jd IexportIhomeIhaR jm jl haR ragu

How wiII you find out enough memory?
c IuseIplatformIsun)uIsbinIprtdiag
c prtconf Y grep ji mem

What command can be used in running a background process?
c nohup C comment D W

How wiII you rectify the root passwd in soIaris
Noot through cdrom 1I% cd in single user mode.
&* boot cdromOs
c mount j; ufs IdevIrds*Ic=t=d=s4 Imnt
c cd mnt
cset !P'Mbvt1==
cexport !P'M jV 6f you dont give, vi editor won@t start properly
c vi IetcIshadow Cremove the passwd entry and save the fileD
c umount Imnt
c reboot C >hile system come up it will as* the new root passwd.D

If the system panic or system not booting
Noot through cdrom 1I% cd in single user mode.
&* boot cdromOs
c mount j; ufs IdevIrds*Ic=t=d=s= Imnt
c cd mnt
c installboot IusrIplatformI@unameOiIlibIfsIufsIbootbl* IdevIrds*Ic==t=d=s=
c umount mnt
c boot jr

ExpIain /etc/inittab fiIes
6t will have ) fieldsC id, rstat, action, processD
'espawn : 'estart daemon if *illed
&ff : Bon@t start the daemon if *illed
&nce: 'un once
>ait: >ait for the process to be completed before processing the next line in IetcIinittab

How wiII you ad new aIiases name
c vi IetcImailIaliases C enter the aliases name CegD service:servicedes*whotmail.com
c newaliases
c IusrIlibIsendmail jv jb Caliases nameD

What are printer daemon
c IetcIinetd.conf jV !his is an services daemons
c in.lpd daemon

ExpIain inode
6t contain the information of the files and directory
$i*e C date, home directory, rights, modified date, etcD

ExpIain /etc/system fiIe
6t will control the *ernel modules and it dived into + sector
Moddir : default loadable *ernel modules
'oot.devices W root files configuration : #hysical path name of the devices
Pxclude: Boes not load the *ernel during *ernel initialiRing
;orceload: ;orce the *ernel module to load
:et: set maxium user b)=

What is the protocoI supported by NFS
AB# and !"#

What is the difference between dsk and rdsk
B:Q: Nloc* level devices
'B:Q: 'aw level device or character level device

How to find the boot path in soIaris
c prtconf jvp Y grep bootpath
or
c eeprom

How to bring the process to offIine or onIine
c psradm jf Cno of the processD
c psradm ja jn C no of the processD

How to check the no of the processor avaiIabIe
c psrinfo jv

How wiII you check the process for particuIar user
c ps jA oracle
or
cps jfu oracle Y grep smon

How do you check the no of user Iogged into the system
c who

How do you check the run IeveI
c who jr

How to enabIe the teInet or ftp session for one host
Pdit the IetcIhosts.allow Cit will have list of host to accessD OV !his will show the user list on that host.O
IetcIhosts.deny Cit will have list of host to access denyDOV !his will show the user list on that host.O
IetcIservices file

If teInet not working, what are the thing to be checked
#ing test, service enable or not in CIetcIinetd.confD, 76: problem

6f telnet is not wor*ing, first of all you will not be get connected, login through console access and then find out
with ps Oef Y grep telnetd or Qill O1 Xpid<inetdV

In which fiIe port Nos are defined
c IetcIservice

TeII me the port for TeInet, ftp,nis,ssh,nfs
ftp b 21ssh b 22!elnet b 2%nfs b 2=)9nis b 5)9

How wiII you restart the inetd process?
c #*ill jA# inetd

What is nice and renice command do
!o set the high priority for the process
O2= high priorities
e2= low priorities
Pg: c nice j2= oracle

What are thing you must ensure to provide security the system
1. $atest patches
2. Access to the system:
IetcIdefaultIlogin
sshd.config
%. $imited su access
). :top unnecessary service at run level
IetcIinetd.config : finger, discard, daytime,charger,tftp,spary W etc

How wiII you check the disk performance?
c iostat jxctd ) +

What are performance tooI used
6ostat ,vmstat , prstat , sar ,netstat, top
Which service assign port no dynamicaIIy
'pc service C IetcIrpcD

As a user how he can change is passwd with root priviIege.
:etuid to set on IusrIbinIpasswd command

What is defauIt permission of /etc/passwd , /etc/shadow fiIes
IetcIpasswd: 4))
IetcIshadow: )==

What is defauIt permission of fiIes and directory?
file: 4))
directory: 5++

What is UMASK
AMA:Q is a Anix environment variable, which automatically sets file permissions on newly created files

DefaIut vaIue for umask
umas* default value is =22

ExpIain setuid, setgid and stickybit
Setuid : >hen setuid permission set on a executable file, user who access the file is granted access
permission of the owner of the file.
c find I Oprem j)===

setgid : #ermission similar to setuid, !he process is changed to owner of the file.
c find I Oprem j2===

Stickybit : 6t is a special permission that protect the files within a public writable directory
:tic*ybit permission set the shared directory, user can create a files or directory
Nut only by owner of the directory can modify or delete.
c find I Oprem j1===

How to set passwd never expire for a user
cpasswd jx j1 CusernameD

How to find the kerneI bit version or architecture
c isainfo j*v

How to set the time zion
c IetcIdefaultIinit
!\b

How to enabIe and disabIe the dtIogin
c IusrIdtIbinIdtconfig je C enableD
c IusrIdtIbinIdtconfig jd C disableD

How to change the hostname and Ethernet address in singIe command
c IusrIsbinIsysOunconfig

How do you add the disk without reboot the server?
c devfsadm jc dis*

How to deIete "abc" fiIes using find command
c find I Oname 2abcZ jexec rm mn^U

What are the NFS daemon in server & cIient
Server Daemons CIient Daemons
1 mountd statd
2.nfsd loc*d
%.nfslogd
).statd
+.loc*d

How to start / stop the nfs server
c IetcIinit.dInfs.server start
c IetcIinit.dInfs.server stop

How to find out the shared fiIe system from server and cIient
:erver : c share W dfmount
"lient : c showmount je ChostnameD and dfshares

To find the OBP environment variabIe
&Q printenv

ExpaIin soft Iink and hard Iink
SoftIink : lin* between different file systems and inode number will be different
CegD IA% j IA)
cln js IA%Ifile1 IA)Ifile2

HardIink : lin* between same file systems and inode number will be same
CegD IA% j IA%
cln js IA%Ifile1 IA%Ifile2

ExpIain FSCK
Atility for chec*ing and repairing the files system inconsistence due to abnormal shutdown.
6t has + phases
#hase 1 : "hec* bloc* and siRe
#hase 2 : "hec* pathname
#hase % : "hec* connectivity
#hase ) : "hec* reference count
#hase + : "hec* cylinder group
If super bIock corrupted how to recover
c newfs j7 IdevIrds*Ic=t=d=s4
!hen run the fsc* utility using alternative super bloc*
c fsc* j; ufs jo bb%2 IdevIrds*Ic=t=d=s4

How to create swap fiIe
cm*file 2=m Ifilename
cswap ja Ifilename
cswap jl C to view and swap fileD
cswap jd C to delete the swap fileD

What is difference between Hard and Soft mount?
ardmount:7ormal file system mount used mainly for mounting local file systems.
&nce a file system is hard mounted, can use a normal filesystem untill
its umount.

:oft mount:6t allows automatic unmounting if the filesystem is idle for a specified timeout
period. 6t is mainly used for networ* filesystems li*e 7;: 6t can be configured
using Autofs and the networ* filesystem can be soft mounted.

Which command to Iock the user Account?
c l* username

How to boot the soIaris system in 64 0r 32 bit kerneI
For 64 bit
c eeprom bootOfilebZI*ernelIsparc9Iunix
or
&Q printenv bootOfile
&Q settenv bootOfile *ernelIsparc9Iunix

For 32 bit
c eeprom bootOfilebZI*ernelIunix
or
&Q printenv bootOfile
&Q settenv bootOfile *ernelIunix

What are processing daemon in nis
Jpserv
Jpbind

What are the daemons in nis server.
rpc.yppasswdd
Jpxfrd
rpc.ypupdated

ExpIain RAID0, RAID1, RAID3,
'A6B = "oncatenationI:triping
'A6B 1 Mirroring
'A6B +O:triped array with rotating parity.

Concatenation: Concatenation is joining of two or more dis* slices to add up the dis* space. "oncatenation
is serial in nature i.e. seLuential data operations are performed serially on first dis* then second dis* and so
on. Bue to serial nature new slices can be added up without having to ta*e the bac*up of entire concatenated
volume, adding slice and restoring bac*up.
Striping: Spreading of data over multiple dis* drives mainly to enhance the performance by distributing data
in alternating chun*s j 14 * interleave across the stripes. :eLuential data operations are performed in parallel
on all the stripes by readingIwriting 14* data bloc*s alternatively form the dis* stripes.
Mirroring: Mirroring provides data redundancy by simultaneously writing data on to two sub mirrors of a
mirrored device. A submirror can be a stripe or concatenated volume and a mirror can have three mirrors. Main
concern here is that a mirror needs as much as the volume to be mirrored.
RAID 5: 'A6B + provides data redundancy and advantage of striping and uses less space than mirroring. A
'A6B + is made up of at least three dis*s, which are striped with parity information written alternately on all the
dis*s. 6n case of a single dis* failure the data can be rebuild using the parity information from the remaining
dis*s.

Where wiII be the configuration for metadevice
cIetcIlvmImd.tab
or
cIetcIoptI:A7>mgImd.tab

How to grow disk size in SDS
1.6dentified the free dis*s and the volumes siRe and meta device name
cdf jh
IdevImdIds*Id19 25G 1.+G 2+G 4T Irpb*up

2.6ncrease the Irpb*up by 1=Gb
c metattach d19 c)t+==4=P8=============818B=======9d=

%.(erify the volume siRe
cmetastat d19

).6ncrease the file system Irpb*up by 1=Gb
c IusrIsbinIgrowfs OM Irpb*up IdevImdIrds*Id19

+.(erify the file system
c dfOh

How to do the disk cIoning on soIaris
ere is the procedure
1.install the dis*
you can do this few ways, let@s the scenario be, the dis* is already attached and its been label through format.
2.6f primary dis* is u r c1t=d=s2
cdd ifbIdevIds*Ic1t=d=s2 ofbIdevIds*Ic1t1d=s2 bsb2+4*
!his will ta*e time, depends on the siRe of the primary dis*
%.verfy the clone dis* has a clean filesystem, for that
cfsc* Oy IdevIrds*Ic1t1d=s=
).!o verify that mount the clone dis*
cmount IdevIds*Ic1t1d=s= Imnt
+.change the IetcIvfstab to point to the clone device
cvi ImntIetcIvfstab
After ma*ing changes, boot the clone dis* sjDone

What is the physicaI device to check the 2 nodes connect in cIuster
#hysical fiber cable which is connect to the 2 nodes is called a HTEARTBEAT

How wiII you take ufsdump and ufsrestore in a sing command Iine?
c ufsdump =f j IdevIrds*Ic=t=d=s4 Y Ccd ImntIhaR ufsrestore xf OD

To check the status of the media inseted on the tape drive
c mt IdevIrmtI= status

Syntex to execute a ufsdump
c ufsdump =uf IdevIrmtI1

Difference between ufs and tar commnad
ufsdump
1. Ased for complete file system bac*up.
2. 6t copies every thing from regular files in a file system to special character and bloc*
device files.
%. 6t can wor* on mounted or unmounted file systems.
Tar:
1. Ased for single or multiple files bac*up.
2. "an@t bac*up special character W bloc* device files.
%. >or*s only on mounted file system.

What is different between crontab and at command?
"rontab: job can be scheduled
At: dob can be a run once only

What is difference between incrementaI backup and differentiaI backup?
6ncremental: &nly those files will be included which have been changed since the last bac*up.
Bifferential: &nly those files will be included which have been changed since the last ;ull bac*up

How many ufsdump IeveI
=O9 level
= b ;ull Nac*up
1O9 b 6ncremental bac*up of file,!hat have changed since the last lower level bac*up.

Options in ufsdump
: b siRe estimate amount of space need on tape
$ b auto loaded
& b offline once the bac*up completed W if possible to eject the media
A b update the IetcIdumpdates files C6ndicate:7ame of the file system,$evel of the bac*up =O9,Bate.
; b specified the tape devices name

Options in ufsrestore
!b list the content of the media
' brestore entire file system
S b restore only the file named on the command line
6 b interactive mode
( b verbose mode
; b specified the tape devices name

Disaster recovery steps if OS corrupted
&* boot cdrom js
c newfs IdevIrds*Ic=t=d=s=
c m*dir a
c mount IdevIds*Ic=t=d=s= Ia
c cd a
c ufsrestore rf IdevIrmtI=
c rm restoresymtable
c cd IusrIplatformI@unameOmIlibIfsIufs
c installboot bootbl* IdevIrds*Ic=t=d=s=
c cd I
c umount Ia
c fsc* IdevIrdsmIc=t=d=s=
c init 4

from the OK prompt, execute
OK> boot -r

How wiII you comment error Iine in /etc/system fiIe
c (i IetcIsystem
C!o comment the error line in IetcIsystem files, we have to use oD

How many repIicas shouId be for raid5 in sds if I have 5 disk
No of Hard Devices No of State Database RepIicas to created
&ne !hree, all on one slice
!woOfour !wo on each drive
;ive or more &ne on each drive

Cannot open /etc/path_to_inst"
:ystem can not find the IetcIpath<to<install file .6t might be missing or corrupted and needs to be rebuild.
!o rebuild this file boot the system with Oar option :
o*Vboot Oar

#ress enter to select default values for the Luestions as*ed during booting and select yes to rebuild
IetcIpath<to<install
!he IetcIpath<to<inst on your system does not exist or is empty. Bo you want to rebuild this file gnh? y
system will continue booting after rebuilding the file.

What is mean by paging & server average time.
6f a dis* shows consistently high readsIwrites along with , the percentage busy CTbD of the dis*s is greater than
+ percent, and the average service time Csvc<tD is greater than %= milliseconds, then one of the following
action needs to be ta*en

Is it possibIe to edit the corntab using vi
It is not recommended but it is possibIe by editing
c vi IvarIspoolIcronIcrontabsIroot
!he command to edit the crontab is
ccrontab Oe

Is it possibIe to create swap in new harddisk without format
2 7o 2 without label the drive, you can@t do anything

What is an aIternative to the "top" command on SoIaris?
c prstat ja
!han* you for reading this article.#lease leave a comment if you have any doubt ,i will get bac* to you as soon
as possible.

Das könnte Ihnen auch gefallen