load average in linux

66
Q:1 Why is LVM is required ? Ans: LVM stands for Logical Volume Manager , to resize filesystem’s size online we required LVM partition in Linux. Size of LVM partition can be extended and reduced using the lvextend & lvreduce commands respectively. Q:2 How To check Memory stats and CPU stats ? Ans: Using ‘free’ & ‘vmstat’ command we can display the physical and virtual memory statistics respectively.With the help of ‘sar’ command we see the CPU utilization & other stats. Q:3 What does Sar provides and at which location Sar logs are stored ? Ans: Sar Collect, report, or save system activity information. The default version of the sar command (CPU utilization report) might be one of the first facilities the user runs to begin system activity investigation, because it monitors major system resources. If CPU utilization is near 100 percent (user + nice + system), the workload sampled is CPU-bound. By default log files of Sar command is located at /var/log/sa/sadd file, where the dd parameter indicates the current day.

Upload: c-rithin-chakravarthy

Post on 19-Jul-2016

17 views

Category:

Documents


3 download

DESCRIPTION

Load Average in Linux

TRANSCRIPT

Page 1: Load Average in Linux

Q:1 Why is LVM is required ?

Ans: LVM stands for Logical Volume Manager , to resize filesystem’s size online we required LVM

partition in Linux. Size of LVM partition can be extended and reduced using the lvextend & lvreduce

commands respectively.

Q:2 How To check Memory stats and CPU stats ?

Ans: Using ‘free’ & ‘vmstat’ command we can display the physical and virtual memory statistics

respectively.With the help of ‘sar’ command we see the CPU utilization & other stats.

Q:3 What does Sar provides and at which location Sar logs are stored ?

Ans: Sar Collect, report, or save system activity information. The default version of the sar command

(CPU utilization report) might be one of the first facilities the user runs to begin system activity

investigation, because it monitors major system resources. If CPU utilization is near 100 percent (user +

nice + system), the workload sampled is CPU-bound.

By default log files of Sar command is located at /var/log/sa/sadd file, where the dd parameter

indicates the current day.

Q:4 How to increase the size of LVM partition ?

Ans: Below are the Logical Steps :

- Use the lvextend command (lvextend -L +100M /dev/<Name of the LVM Partition> , in this example we

are extending the size by 100MB.

- resize2fs /dev/<Name of the LVM Partition>

Page 2: Load Average in Linux

- check the size of partition using ‘df -h’ command

Q:5 How to reduce or shrink the size of LVM partition ?

Ans: Below are the logical Steps to reduce size of LVM partition :

-Umount the filesystem using umount command,

-use resize2fs command , e.g resiz2fs /dev/mapper/myvg-mylv 10G

-Now use the lvreduce command , e.g lvreduce -L 10G /dev/mapper/myvg-mylv

Above Command will shrink the size & will make the filesystem size 10GB.

Q:6 How to create partition from the raw disk ?

Ans: Using fdisk utility we can create partitions from the raw disk.Below are the steps to create partition

from the raw dsik :

- fdisk /dev/hd* (IDE) or /dev/sd* (SCSI)

- Type n to create a new partition

- After creating partition , type w command to write the changes to the partition table.

Q:7 Where the kernel modules are located ?

Ans: The ‘/lib/modules/kernel-version/’ directory stores all kernel modules or compiled drivers in Linux

operating system. Also with ‘lsmod’ command we can see all the installed kernel modules.

Q:8 What is umask ?

Page 3: Load Average in Linux

Ans: umask stands for ‘User file creation mask’, which determines the settings of a mask that controls

which file permissions are set for files and directories when they are created.

Q:9 How to set the umask permanently for a user?

Ans: To set this value permanently for a user, it has to be put in the appropriate profile file which

depends on the default shell of the user.

Q:10 How to change the default run level in linux ?

Ans: To change the run level we have to edit the file “/etc/inittab” and change initdefault entry

( id:5:initdefault:). Using ‘init’ command we change the run level temporary like ‘init 3 , this command ′will move the system in runlevl 3.

Q:11 How to share a directory using nfs ?

Ans: To share a directory using nfs , first edit the configuration file ‘/etc/exportfs’ , add a entry like

‘/<directory-name> <ip or Network>(Options)’ and then restart the nfs service.

Q:12 How to check and mount nfs share ?

Ans: Using ‘showmount’ command we can see what directories are shared via nfs e.g ‘showmount -e <ip

address of nfs server>’.Using mount command we can mount the nfs share on linux machine.

Q:13 What are the default ports used for SMTP,DNS,FTP,DHCP,SSH and squid ?

Ans: Service Port

SMTP 25

Page 4: Load Average in Linux

DNS 53

FTP 20 (data transfer) , 21 ( Connection established)

DHCP 67/UDP(dhcp server) , 68/UDP(dhcp client)

SSH 22

Squid 3128

Q:14 What is Network Bonding ?

Ans: Network bonding is the aggregation of multiple Lan cards into a single bonded interface to provide

fault tolerance and high performance. Network bonding is also known as NIC Teaming.

Q:15 What are the different modes of Network bonding in Linux ?

Ans: Below are list of modes used in Network Bonding :

balance-rr or 0 – round-robin mode for fault tolerance and load balancing.

active-backup or 1 – Sets active-backup mode for fault tolerance.

balance-xor or 2 – Sets an XOR (exclusive-or) mode for fault tolerance and load balancing.

broadcast or 3 – Sets a broadcast mode for fault tolerance. All transmissions are sent on all slave

interfaces.

802.3ad or 4 – Sets an IEEE 802.3ad dynamic link aggregation mode. Creates aggregation groups that

share the same speed & duplex settings.

balance-tlb or 5 - Sets a Transmit Load Balancing (TLB) mode for fault tolerance & load balancing.

balance-alb or 6 - Sets an Active Load Balancing (ALB) mode for fault tolerance & load balancing.

Q:16 How to check and verify the status the bond interface.

Page 5: Load Average in Linux

Ans: Using the command ‘cat /proc/net/bonding/bond0 , we can check which mode is enabled and ′what lan cards are used in this bond. In this example we have one only one bond interface but we can

have multiple bond interface like bond1,bond2 and so on.

Q:17 How to check default route and routing table ?

Ans: Using the Commands ‘netstat -nr’ and ‘route -n’ we can see the default route and routing tables.

Q:18 How to check which ports are listening in my Linux Server ?

Asn: Use the Command ‘netstat –listen’ and ‘lsof -i’

Q:19 List the services that are enabled at a particular run level in linux server ?

Ans: With the help of command ‘chkconfig –list | grep 5:on’ we can list all the service that are enabled in

run level5. For other run levels just replace 5 with the respective run level.

Q:20 How to enable a service at a particular run level ?

Ans: We can enable a service using the Command ‘chkconfig <Service-Name> on –level 3′

Q:21 How to upgrade Kernel in Linux ?

Ans: We should never upgrade Linux Kernel , always install the new New kernel using rpm command

because upgrading a kenel can make your linux box in a unbootable state.

Q:22 How To scan newly asssigned luns on linux box without rebooting ?

Page 6: Load Average in Linux

Ans: There are two ways to scan newly assigned luns :

Method:1 if sg3 rpm is installed , then run the command ‘rescan-scsi-bus.sh’

Method:2 Run the Command , echo ” – - – ” > /sys/class/scsi_host/hostX/scan

Q:23 How to find WWN numbers of HBA cards in Linux Server ?

Ans: We can find the WWN numbers of HBA cards using the command ‘systool -c fc_host -v | grep

port_name’

Q:24 How to add & change the Kernel parameters ?

Ans: To Set the kernel parameters in linux , first edit the file ‘/etc/sysctl.conf’ after making the changes

save the file and run the command ‘sysctl -p’ , this command will make the changes permanently

without rebooting the machine.

Q:25 What is Puppet Server ?

Ans: Puppet is an open-source & enterprise software for configuration management toll in UNIX like

operating system. Puppet is a IT automation software used to push configuration to its clients (puppet

agents) using code. Puppet code can do a variety of tasks from installing new software, to check file

permissions, or updating user accounts & lots of other tasks.

Q:26 What are manifests in Puppet ?

Ans: Manifests, in Puppet, are the files in which the client configuration is specified.

Q:27 Which Command is used to sign requested certificates in Puppet Server ?

Ans: ‘puppetca –sign hostname-of-agent’ in (2.X) & ‘puppet ca sign hostname-of-agent’ in (3.X)

Page 7: Load Average in Linux

Q:28 At which location Puppet Master Stores Certificates ?

Ans: /var/lib/puppet/ssl/ca/signed

Q:29 How to find all the regular files in a directory ?

Ans: using the command ‘find /<directory -type f’.

Q:30 What is load average in a linux ?

Ans: Load Average is defined as the average sum of the number of process waiting in the run queue and

number of process currently executing over the period of 1,5 and 15 minutes. Using the ‘top’ and

‘uptime’ command we find the load average of a linux sever.

Q:1 How To check the uptime of a Linux Server ?

Ans: Using uptime command we can determine how long a linux box has been running , also uptime can

be viewed by the top & w command.

Q:2 How to check which Redhat version is installed on Server ?

Ans: Use the command cat /etc/redhat-release , output of this command will tell you the redhat version.

Q:3 How to install rpm packages in Redhat & CentOS linux ?

Page 8: Load Average in Linux

Ans: rpm and yum command are used to install packages in redhat linux and CentOS.

Q:4 How to check the ip address of LAN Card ?

Ans: Using 'ifconfig' & 'ip address' command we can determine the ip address of LAN Card.

Q:5 How to determine the hostname of a linux box ?

Ans: On typing the hostname command on terminal we can determine the hostname of a linux server.

Q:6 How To check the default gatway ?

Ans: Using 'rount -n' command we can determine the default gateway in linux.

Q:7 Which Command is used to check the kernel Version ?

Ans: 'uname -r'

Q:8 How to check the current runlevel of a linux box ?

Ans : 'who -r' and 'runlevel' , both of these command are used to find current run level.

Q:9 What is Initrd ?

Page 9: Load Average in Linux

Ans: Initrd stands for initial ram disk , which contains the temporary root filesystem and neccessary

modules which helps in mounting the real root filesystem in read mode only.

Q:10 What is Bootloader ?

Ans: Bootloader is a program that boots the operating system and decides from which kernel OS will

boot.

Q:11 How to list hidden files from the command line ?

Ans: 'ls -a' <Folder_Name>

Q:12 What is soft link ?

Ans: Soft link is a method to create short cuts in linux. It is similar to windows short cut feature.

Q:13 How to create a blank file in linux from command line ?

Ans: Using the command 'touch <file-name>'

Q;14 What is run level 2 ?

Ans: Run level 2 is the multi-user mode without networking.

Q:15 Why linux is called OpenSource ?

Ans: Becuase One can customize the existing code and can redistribute it.

Page 10: Load Average in Linux

Q:16 How to check all the installed Kernel modules ?

Ans: Using the Command 'lsmod' we can see the installed kernel modules.

Q:17 What is the default uid & gid of root user ?

Ans: Default uid & gid of root user is 0.

Q:18 How To change the password of user from the Command Line ?

Ans: 'passwd <User-Name>'

Q:19 What is a Process ?

Ans: Any program in execution is called a process.

Q:20 What is name of first process in linux ?

Ans: 'init' is the first process in linux which is started by kernel and whose pid is 1.

Q:1 What does VSFTPD Stands for ?

Ans: VSFTPD stands for Very Secure FTP Daemon.

Q:2 What are the defaults ports used in linux ftp server ?

Ans: Port 20 – This is the data transfer port. All the all subsequent data transfers between the client and

server are done using this port.

Page 11: Load Average in Linux

Port 21 – On this port control connection is established. All commands we send and the ftp server's

responses to those commands will go over the control connection, but any data sent back (such as "ls"

directory lists or actual file data in either direction) will go over the data connection.

Q:3 What are most common features of vsftpd ?

Ans:some of the Common Features are listed below :

Virtual IP configurations

Virtual users

Standalone or inetd operation

Powerful per-user configurability

Bandwidth throttling

Per-source-IP configurability

Per-source-IP limits

IPv6

Encryption support through SSL integration

Q:4 What is the configuration file of vsftpd ?

Ans: '/etc/vsftp/vsftpd.conf'

Q:5 How to restart the service of ftp server in linux ?

Ans: Service vsftpd restart or /etc/init.d/vsftpd restart

Page 12: Load Average in Linux

Q:6 Which Users tare not allowed to login via ftp ?

Ans: Users mentioned in the file '/etc/vsftpd/ftpusers' are not allowed to login via ftp.

Q:7 How to disable standard ftpd xferlog log format and enable default vsftpd log ?

Ans : Edit the file ' /etc/vsftpd/vsftpd.conf' & make the below changes:

xferlog_std_format=NO

log_ftp_protocol=YES

The default vsftpd log file is /var/log/vsftpd.log

Q:8 What is default directory for ftp / Anonymous user ?

Ans : '/var/ftp' is the default directory for ftp or Anonymous user

Q:9 How to change the default directory for ftp / Anonymous user ?

Ans: Edit the file '/etc/vsftpd/vsftpd.conf' and change the below directive :

anon_root=/<Path-of-New-Directory>

After making above change either restart or reload vsftpd service.

Q:10 How to disable Anonymous user in vsftpd ?

Ans: Edit the conf file '/etc/vsftpd/vsftpd.conf' and chnage below directive and restart the ftp service.

Page 13: Load Average in Linux

anonymous_enable=NO

Q:11 What is chroot environment in ftp server ?

Ans: chroot environment prevents the user from leaving its home directory means jail like environment

where users are limited to their home directory only. It is the addon security of ftp server.

Q:12 How to enable chroot environment in vsftpd server ?

Ans : To enable chroot environment edit the file '/etc/vsftpd/vsftpd.conf' and enable the below

directives :

chroot_list_enable=YES

The chroot_list_file variable specifies the file which contains users that are chroot.

Q:13 How to enable only limited/allowed users are able to login via ftp ?

Ans: This can be done by editing the file '/etc/vsftpd/vsftpd.conf' and add the below directives :

userlist_enable=YES

userlist_file=/etc/vsftpd.user_list

userlist_deny=NO

The file specified by userlist_file will now contain users that are able to login.

Q:14 How to set ftp banner in linux ?

Ans: Open the file '/etc/vsftpd/vsftpd.conf' and set the below directive :

Page 14: Load Average in Linux

ftpd_banner= “Enter New Banner Here”

Q:15 How To limit the data transfer rate, number of clients & connections per IP for local users ?

Ans: Edit the ftp server's config file(/etc/vsftpd/vsftpd.conf) and set the below directives :

local_max_rate=1000000 # Maximum data transfer rate in bytes per second

max_clients=50 # Maximum number of clients that may be connected

max_per_ip=2 # Maximum connections per IP

Q:1 What is postfix and default port used for postfix ?

Ans: Postfix is a open source MTA (Mail Transfer agent) which is used to route & deliver emails. Postfix is

the alternate of widely used Sendmail MTA. Default port for postfix is 25.

Q:2 What is the difference between Postfix & Sendmail ?

Ans: Postfix uses a modular approach and is composed of multiple independent executables. Sendmail

has a more monolithic design utilizing a single always running daemon.

Page 15: Load Average in Linux

Q:3 What is MTA and it’s role in mailing system ?

Ans: MTA Stands for Mail Transfer Agent.MTA receives and delivers email. Determines message routing

and possible address rewriting. Locally delivered messages are handed off to an MDA for final delivery.

Examples Qmail, Postfix, Sendmail

Q:4 What is MDA ?

Ans: MDA stands for Mail Delivery Agent. MDA is a Program that handles final delivery of messages for a

system's local recipients. MDAs can often filter or categorize messages upon delivery. An MDA might

also determine that a message must be forwarded to another email address. Example Procmail

Q:5 What is MUA ?

Ans: MUA stands for Mail User Agent. MUA is aEmail client software used to compose, send, and

retrieve email messages. Sends messages through an MTA. Retrieves messages from a mail store either

directly or through a POP/ IMAP server. Examples Outlook, Thunderbird, Evolution.

Page 16: Load Average in Linux

Q:6 What is the use of postmaster account in Mailserver ?

Ans: An email administrator is commonly referred to as a postmaster. An individual with postmaster

responsibilities makes sure that the mail system is working correctly, makes configuration changes, and

adds/removes email accounts, among other things. You must have a postmaster alias at all domains for

which you handle email that directs messages to the correct person or persons .

Q:7 What are the important daemons in postfix ?

Ans : Below are the lists of impportant daemons in postfix mail server :

master :The master daemon is the brain of the Postfix mail system. It spawns all other daemons.

smtpd: The smtpd daemon (server) handles incoming connections.

smtp :The smtp client handles outgoing connections.

qmgr :The qmgr-Daemon is the heart of the Postfix mail system. It processes and controls all messages

in the mail queues.

local : The local program is Postfix’ own local delivery agent. It stores messages in mailboxes.

Q:8 What are the configuration files of postfix server ?

Page 17: Load Average in Linux

Ans: There are two main Configuration files of postfix :

/etc/postfix/main.cf : This file holds global configuration options. They will be applied to all instances of

a daemon, unless they are overridden in master.cf

/etc/postfix/master.cf : This file defines runtime environment for daemons attached to services.

Runtime behavior defined in main.cf may be overridden by setting service specific options.

Q:9 How to restart the postfix service & make it enable across reboot ?

Ans: Use this command to restart service “ Service postfix restart” and to make the service persist across

the reboot, use the command “ chkconfig postfix on”

Q:10 How to check the mail's queue in postfix ?

Ans: Postfix maintains two queues, the pending mails queue, and the deferred mail queue,the deferred

mail queue has the mail that has soft-fail and should be retried (Temporary failure), Postfix retries the

deferred queue on set intervals (configurable, and by default 5 minutes)

To display the list of queued mails :

# postqueue -p

To Save the output of above command :

Page 18: Load Average in Linux

# postqueue -p > /mnt/queue-backup.txt

Tell Postfix to process the Queue now

# postqueue -f

Q:11 How to delete mails from the queue in postfix ?

Ans: Use below command to delete all queued mails

# postsuper -d ALL

To delete only deferred mails from queue , use below command

# postsuper -d ALL deferred

Q:12 How to check postfix configuration from the command line ?

Page 19: Load Average in Linux

Ans: Using the command 'postconf -n' we can see current configuration of postfix excluding the lines

which are commented.

Q:13 Which command is used to see live mail logs in postfix ?

Ans: Use the command 'tail -f /var/log/maillog' or 'tailf /var/log/maillog'

Q:14 How to send a test mail from command line ?

Ans: Use the below command to send a test mail from postfix itself :

# echo "Test mail from postfix" | mail -s "Plz ignore" [email protected]

Q:15 What is an Open mail relay ?

Page 20: Load Average in Linux

Ans: An open mail relay is an SMTP server configured in such a way that it allows anyone on the Internet

to send e-mail through it, not just mail destined to or originating from known users.This used to be the

default configuration in many mail servers; indeed, it was the way the Internet was initially set up, but

open mail relays have become unpopular because of their exploitation by spammers and worms.

Q:16 What is relay host in postfix ?

Ans: Relay host is the smtp address , if mentioned in postfix config file , then all the incoming mails be

relayed through smtp server.

Q:17 What is Greylisting ?

Ans: Greylisting is a method of defending e-mail users against spam. A mail transfer agent (MTA) using

greylisting will "temporarily reject" any email from a sender it does not recognize. If the mail is

legitimate the originating server will, after a delay, try again and, if sufficient time has elapsed, the email

will be accepted.

Q:18 What is the importance of SPF records in mail servers ?

Page 21: Load Average in Linux

Ans: SPF (Sender Policy Framework) is a system to help domain owners specify the servers which are

supposed to send mail from their domain. The aim is that other mail systems can then check to make

sure the server sending email from that domain is authorized to do so – reducing the chance of email

'spoofing', phishing schemes and spam!

Q:19 What is the use of Domain Keys(DKIM) in mail servers ?

Ans: DomainKeys is an e-mail authentication system designed to verify the DNS domain of an e-mail

sender and the message integrity. The DomainKeys specification has adopted aspects of Identified

Internet Mail to create an enhanced protocol called DomainKeys Identified Mail (DKIM).

Q:20 What is the role of Anti-Spam SMTP Proxy (ASSP) in mail server ?

Ans: ASSP is a gateway server which is install in front of your MTA and implements auto-whitelists, self

learning Bayesian, Greylisting, DNSBL, DNSWL, URIBL, SPF, SRS, Backscatter, Virus scanning, attachment

blocking, Senderbase and multiple other filter methods

Q:1 What does BIND Stands for ?

Ans: BIND stands for Berkeley Internet Name Domain.

Page 22: Load Average in Linux

Q:2 What is DNS Server and its fundamentals ?

Ans: The Domain Name System (DNS) is a hierarchical, distributed database. It stores information for

mapping Internet host names to IP addresses and vice versa, mail routing information, and other data

used by Internet applications. Clients look up information in the DNS by calling a resolver library, which

sends queries to one or more name servers and interprets the responses. The BIND 9 software

distribution contains a name server, named, and a resolver library, liblwres.

Q:3 What is the default port of BIND ?

Ans: The BIND server is accessed via the network on port 53. Both TCP and UPD ports are used. Queries

are made via UDP & Responses are made via UDP unless the response is too large to fit in a single packet

, If the response won’t fit in a single UDP packet, then the response is returned via TCP.

Q:4 How will you define Domain Name ?

Ans: The data stored in the DNS is identified by domain names that are organized as a tree according to

organizational or administrative boundaries. Each node of the tree, called a domain, is given a label. The

domain name of the node is the concatenation of all the labels on the path from the node to the root

node. This is represented in written form as a string of labels listed from right to left and separated by

dots. A label need only be unique within its parent domain.

Page 23: Load Average in Linux

For example, a domain name for a host at the company Linuxtechi, Inc. could be mail.linuxtechi.com,

where com is the top level domain to which mail.linuxtechi.com belongs, example is a subdomain of

com, and ‘mail’ is the name of the host

Q:5 What are zone files in DNS server ?

Ans: The files which contain the data being served by the DNS system are called “Zone Files” They are

made up of a series of “Resource Records”. A Zone File will always contain an SOA record as well as

additional records.

Q:6 What are the different types of DNS Server ?

Ans: Primary Master : The authoritative server where the master copy of the zone data is maintained is

called the primary master server, or simply the primary. Typically it loads the zone contents from some

local file edited by humans or perhaps generated mechanically from some other local file which is edited

by humans. This file is called the zone file or master file.

Slave Server : The other authoritative servers, the slave servers (also known as secondary servers) load

the zone contents from another server using a replication process known as a zone transfer. Typically

the data are transferred directly from the primary master, but it is also possible to transfer it from

another slave. In other words, a slave server may itself act as a master to a subordinate slave server.

Caching Name Server : Caching Name server is not authoritative for any zone, all queries are forwarded

to other DNS servers if they are not stored in the DNS-cache zone. Answers for all queries are cached in

DNS-cache zone for a time.

Forwarding : In this type of DNS server , all queries are forwarded to a specific list of name servers

Page 24: Load Average in Linux

Q:7 How the load balancing is achieved using DNS ?

Ans: A primitive form of load balancing can be achieved in the DNS by using multiple records (such as

multiple A records) for one name. For example, if you have three WWW servers with network addresses

of 10.0.0.1, 10.0.0.2 and 10.0.0.3, a set of records such as the following means that clients will connect

to each machine one third of the time

multiple-a-records

When a resolver queries for these records, BIND will rotate them and respond to the query with the

records in a different order. In the example above, clients will randomly receive records in the order 1,2,

3; 2, 3, 1; and 3, 1, 2. Most clients will use the first record returned and discard the rest.

Q:8 How to check syntax of named.conf is correct or not ?

Ans: named-checkconf is the command, which checks the syntax of named.conf file.

# named-checkconf /etc/named.conf

If bind is running in chroot environment use below command

Page 25: Load Average in Linux

# named-checkconf -t /var/named/chroot /etc/named.conf

Q:9 What are the different types of Resource Records in bind ?

Ans: Below are the list of resource records in bind :

SOA – start of authority, for a given zone

NS – name server

A – name-to-address mapping

PTR – address-to-name mapping

CNAME – canonical name (for aliases)

MX – mail exchanger (host to receive mail for this name)

TXT – textual info

RP – contact person for this zone

WKS – well known services

HINFO – host information

Comments start with ; continue to end of line

Q:10 Explain Bind chroot environment ?

Page 26: Load Average in Linux

Ans: Running bind in a chroot environment means named process will be limited to their directory only

(/var/named/chroot). This can help improve system security by placing BIND in a ”sandbox”, which will

limit the damage done if a server is compromised.

Q:11 What is domain delegation in Bind ?

Ans: Domain delegation means fully delegate the responsibility for a sub-domain to another name

server.

Exmaple :

squid.linuxtechi.com IN NS ns2.linuxtechi.com

ns2.linuxtechi.com IN A 192.168.1.51

Q:1 What is the default port & configuration file of SSH Server ?

Ans: 22 is default port for ssh and ‘/etc/ssh/sshd_config’ is the configuration file.

Q:2 How to change the default ssh port in linux ?

Ans: To change the port , first edit the file ‘ /etc/ssh/sshd_config ‘ , change the vaule of parameter ‘ port

22 ‘, now restart the ssh service.

Q:3 What is the configuration file of ssh client ?

Page 27: Load Average in Linux

Ans: ‘ /etc/ssh/ssh_config ‘ is configuration file for ssh client.

Q:4 What is SSH port forwarding ?

Ans: SSH Port Forwarding, sometimes called SSH Tunneling, which allows you to establish a secure SSH

session and then tunnel arbitrary TCP connections through it. Tunnels can be created at any time, with

almost no effort and no programming.

Syntax : ssh -L localport:host:hostport user@ssh_server -N

where:

-L – port forwarding parameters

localport – local port (chose a port that is not in use by other service)

host – server that has the port (hostport) that you want to forward

hostport – remote port

-N – do not execute a remote command, (you will not have the shell, see below)

user – user that have ssh access to the ssh server (computer)

ssh_server – the ssh server that will be used for forwarding/tunneling

Without the -N option you will have not only the forwarding port but also the remote shell.

Q:5 How to disable the root login in linux server ?

Ans: Open the file ‘ /etc/ssh/sshd_config ‘ and chnage the paramenter ‘PermitRootLogin yes’ to

‘PermitRootLogin no’ & restart the ssh service.

Page 28: Load Average in Linux

Q:6 How to allow only specific users to ssh your linux server ?

Ans: Open the file ‘/etc/ssh/sshd_config’ and add the parameter ‘AllowUsers user1 user2 & then restart′

the ssh server.

Q:7 How to enable debugging in ssh command ?

Ans: To enable debugging in ssh command use ‘-v’ option like ‘ssh [email protected] -v’. To

increase the debugging level just increase the number of v’s.

Q:8 What is the difference between ssh & Telnet ?

Ans: In ssh communication between client & server is encrypted but in telnet communication between

the client & server is in plain text . We can also say SSH uses a public key for authentication while Telnet

does not use any authentication.SSH adds a bit more overhead to the bandwidth compared to

Telnet.Default port of ssh is 22 and for telnet 23.

Q:9 What is use of sshpass command in linux ?

Ans: sshpass is a command which allows us to automatically supply password to the command prompt

so that automated scripts can be run as desired by users. sshpass supplies password to ssh prompt using

a dedicated tty , fooling ssh to believe that a interactive user is supplying password.

Q:10 What is the use of scp command ?

Ans: SCP stands for Secure Copy ,it copies files between hosts over a network. It uses ssh for data

transfer & uses the same authentication and provides the same security as ssh. Unlike rcp, scp will ask

for passwords or passphrases if they are needed for authentication.

Page 29: Load Average in Linux

Q:11 What is the use of blowfish options in scp command ?

Ans: Using blowfish options in scp command , we can increase the speed, by default scp uses the Triple-

DES cipher to encrypt the data being copied.

Example : scp -c blowfish /home/itstuff.txt [email protected]:/opt/

Q:12 How to limit the bandwidth used by scp command ?

Ans: We can limit the bandwidth used by the scp command using the -l option as shown in the

syntax.’#scp -l bandwidth_limit filename username@remote-host:/folder-name’ , where

bandwidth_limit is numeric to be specified in kilobits per second.

Q:13 How to enable passwordless ssh authentication in Linux ?

Ans: To Implement passwordless or Keys based authentication we have to generate Public and Private

keys , Copy the Pubic keys to remote Linux servers either manually or by ssh-copy-id command.ssh-

copy-id command will automatically copy the contents of id_rsa.pub file to ‘~/.ssh/authorized_keys’ file

of remote linux server.

Q:14 How to check SSH server’s Version ?

Ans: Using the command ‘ ssh -V ‘ we can find the ssh server’s version.

Q:15 How to Copy the file “server.txt” from the local machine to a remote host using port 2751 in /opt

folder.

Ans: scp -P 2751 /home/server.txt [email protected]:/opt

Q:1 Why to use NFS ?

Page 30: Load Average in Linux

Ans: A Network File System (NFS) allows remote machine to mount file systems over a network and

interact with those file systems as though they are mounted locally. This enables system administrators

to consolidate resources onto centralized servers over the network.

Q:2 What is the default port of NFS server ?

Ans: By default NFS uses 2049 TCP port.

Q:3 What are different versions of NFS Server ?

Ans: Currently, there are three versions of NFS. NFS version 2 (NFSv2) is older and widely supported. NFS

version 3 (NFSv3) supports safe asynchronous writes and is more robust at error handling than NFSv2; it

also supports 64-bit file sizes and offsets, allowing clients to access more than 2Gb of file data.

NFS version 4 (NFSv4) works through firewalls and on the Internet, no longer requires an rpcbind

service, supports ACLs, and utilizes stateful operations. Red Hat Enterprise Linux 6.X & Centos 6.X

supports NFSv2,NFSv3, and NFSv4 clients. When mounting a file system via NFS, Red Hat Enterprise

Linux uses NFSv4 by default, if the server supports it.

Q:4 What are configuration files of NFS server ?

Ans: '/etc/exports' is the main configuration file that controls which file systems are exported to remote

hosts and specifies options.

'/etc/sysconfig/nfs' is the file through which we can fix ports for RQUOTAD_PORT, MOUNTD_PORT,

LOCKD_TCPPORT, LOCKD_UDPPORT and STATD_PORT

Page 31: Load Average in Linux

Q:5 What are different options used in /etc/exports file ?

Ans: Below are list of options used in /etc/exports file :

ro: The directory is shared read only; the client machine will not be able to write to it. This is the default.

rw: The client machine will have read and write access to the directory.

root_squash: By default, any file request made by user root on the client machine is treated as if it is

made by user nobody on the server. (Exactly which UID the request is mapped to depends on the UID of

user "nobody" on the server, not the client.)

no_root_squash : if this option is used , then root on the client machine will have the same level of

access to the files on the system as root on the server. This can have serious security implications,

although it may be necessary if you want to perform any administrative work on the client machine that

involves the exported directories. You should not specify this option without a good reason.

no_subtree_check : If only part of a volume is exported, a routine called subtree checking verifies that a

file that is requested from the client is in the appropriate part of the volume. If the entire volume is

exported, disabling this check will speed up transfers.

sync : Replies to the NFS request only after all data has been written to disk. This is much safer than

async, and is the default in all nfs-utils versions after 1.0.0.

async : Replies to requests before the data is written to disk. This improves performance, but results in

lost data if the server goes down.

no_wdelay : NFS has an optimization algorithm that delays disk writes if NFS deduces a likelihood of a

related write request soon arriving. This saves disk writes and can speed performance

wdelay : Negation of no_wdelay , this is default

Page 32: Load Average in Linux

nohide : Normally, if a server exports two filesystems one of which is mounted on the other, then the

client will have to mount both filesystems explicitly to get access to them. If it just mounts the parent, it

will see an empty directory at the place where the other filesystem is mounted. That filesystem is

"hidden". Setting the nohide option on a filesystem causes it not to be hidden, and an appropriately

authorised client will be able to move from the parent to that filesystem without noticing the change.

hide : Negation of nohide This is the default

Q:6 How to list available nfs share on local machine & remote machine ?

Ans: 'showmount -e localhost' : Shows the available shares on your local machine

'showmount -e <Remote-server-ip or hostname>': Lists the available shares at the remote server

Q:7 What is pNFS ?

Ans: Parallel NFS (pNFS) as part of the NFS v4.1 standard is available as of Red Hat Enterprise Linux 6.4.

The pNFS architecture improves the scalability of NFS, with possible improvements to performance.

That is, when a server implements pNFS as well, a client is able to access data through multiple servers

concurrently. It supports three storage protocols or layouts: files, objects, and blocks.

Q:8 What is the difference between Hard mount & Soft mount in nfs ?

Ans: Difference between soft mount and hard mount is listed below :

Soft Mount : Consider we have mounted a NFS share using 'soft mount' . When a program or

application requests a file from the NFS filesystem, NFS client daemons will try to retrieve the data from

the NFS server. But, if it doesn’t get any response from the NFS server (due to any crash or failure of NFS

Page 33: Load Average in Linux

server), the NFS client will report an error to the process on the client machine requesting the file

access. The advantage of this mechanism is “fast responsiveness” as it doesn’t wait for the NFS server to

respond. But, the main disadvantage of this method is data corruption or loss of data. So, this is not a

recommended option to use.

Hard Mount : Suppose we have mounted the NFS share using hard mount, it will repeatedly retry to

contact the server. Once the server is back online the program will continue to execute undisturbed

from the state where it was during server crash. We can use the mount option “intr” which allows NFS

requests to be interrupted if the server goes down or cannot be reached. Hence the recommended

settings are hard and intr options.

Q:9 How to check iostat of nfs mount points ?

Ans: Using command 'nfsiostat' we can list iostat of nfs mount points. Use the below command :

# nfsiostat <interval> <count> <mount_point>

<interval> : specifies the amount of time in seconds between each report. The first report contains

statistics for the time since each file system was mounted. Each subsequent report contains statistics

collected during the interval since the previ-ous report.

<count> : If the <count> parameter is specified, the value of <count> determines the number of reports

generated at seconds apart. if the interval parameter is specified without the <count> parameter, the

command generates reports continuously.

<mount_point> : If one or more <mount point> names are specified, statistics for only these mount

points will be displayed. Otherwise, all NFS mount points on the client are listed.

Q:10 How to check nfs server version ?

Page 34: Load Average in Linux

Ans: 'nfsstat -o all' command shows all information about active versions of NFS.

Q:11 What is portmap?

Ans: The portmapper keeps a list of what services are running on what ports. This list is used by a

connecting machine to see what ports it wants to talk to access certain services.

Q:12 How to reexport all the directories of '/etc/exports' file ?

Ans: Using the command ' exportfs -r ' , we can reexport or refresh entries of '/etc/exports' file without

restarting nfs service.

1. Which account is created on Linux installation?

- With the installation of Linux, a super user account is created called as ‘root’.

2. Which daemon tracks events on your system?

- The syslogd daemon tracks the system information and saves it to specified log files.

3. Which command would you use if you want to remove the password assigned to a group?

Page 35: Load Average in Linux

- 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.

4. You wish to print a file ‘draft’ with 60 lines to a page. What command would you use?

- The command that I would use is: pr -l60 draft

- The default page length when using pr is 66 lines.

- The -l option specifies a different length.

Test your linux knowledge with our multiple choice questions!

Linux part 1 (27 questions)

Linux part 2 (25 questions)

Linux part 3 (25 questions)

Download Linux interview questions and answers

5. Which file would you examine to determine the levels of messages written to system log files?

- kernel.h

Page 36: Load Average in Linux

6. You are logged on as a regular user. Without logging off and logging on as root, you are required to

create a new user account immediately. How would you do it?

- This can be achieved by issuing the su command.

- This will prompt you for the password of the root account.

- Providing the password, logs you in as root. Now, you can perform any administrative duties. .

7. You are required to restore the file memo.ben. It was backed up in the tar file MyBackup.tar. Which

command would you use to do it?

- The command that we would use is: tar xf MyBackup.tar memo.ben

- It uses the x switch to extract a file.

8. What is partial backup?

- When you select only a portion of your file hierarchy or a single partition to back up, it is called partial

back up.

9. What is the fastest way to enter a series of commands from the command-line?

- Write the commands, each separated by a semi-colon. Press enter after the last command.

- The semi-colon would inform the shell that multiple commands are being entered at the command

line, to be executed serially.

Page 37: Load Average in Linux

10. What are the qualities of soft links?

a.) Soft link files have different inode numbers than source file

b.) The soft link file will be of no use if original file is deleted.

c.) Soft links are not updated

d.) They can create links between directories

e.) They can cross file system boundaries

11. Differentiate between Cron and Anacron.

a.) Minimum granularity with Cron is minute while it is in days with Anacron.

b.) Cron job can be scheduled by any normal user while Anacron can be scheduled only by the super

user.

c.) Cron expects the system to be up and running while the Anacron doesn’t expect the system to be up

and running all the time. In case of anacron if a job is scheduled and the system is down that time, it will

execute the job as soon as the system is up and running.

d.) Cron is ideal for servers while Anacron is ideal for desktops and laptops.

e. ) Cron should be used when you want a job to be executed at a particular hour and minute while

Anacron should be used in when the job can be executed irrespective of the hour and minute.

12.) What is an INODE?

Page 38: Load Average in Linux

- It is a structure which has the description of all the files and pointers to the data blocks of file stored in

it.

- The information contained is file-size, access and modification time, permission and so on.

13. Which command is used to check the number of files and disk space used and the each user’s

defined quota?

repquota command is used to check the status of the user’s quota along with the disk space and number

of files used. This command gives a summary of the user’s quota that how much space and files are left

for the user. Every user has a defined quota in Linux. This is done mainly for the security, as some users

have only limited access to files. This provides a security to the files from unwanted access. The quota

can be given to a single user or to a group of users.

14. What is the name and path of the main system log?

By default the main system log is /var/log/messages. This file contains all the messages and the script

written by the user. By default all scripts are saved in this file. This is the standard system log file, which

contains messages from all system software, non-kernel boot issues, and messages that go to 'dmesg'.

dmesg is a system file that is written upon system boot.

16. How secured is Linux? Explain.

Security is the most important aspect of an operating system. Due to its unique authentication module,

Linux is considered as more secured than other operating systems. Linux consists of PAM. PAM is

Pluggable Authentication Modules. It provides a layer between applications and actual authentication

mechanism. It is a library of loadable modules which are called by the application for authentication. It

Page 39: Load Average in Linux

also allows the administrator to control when a user can log in. All PAM applications are configured in

the directory "/etc/pam.d" or in a file "/etc/pam.conf". PAM is controlled using the configuration file or

the configuration directory.

17. Can Linux computer be made a router so that several machines may share a single Internet

connection? How?

Yes a Linux machine can be made a router. This is called "IP Masquerade." IP Masquerade is a

networking function in Linux similar to the one-to-many (1: Many) NAT (Network Address Translation)

servers found in many commercial firewalls and network routers. The IP Masquerade feature allows

other "internal" computers connected to this Linux box (via PPP, Ethernet, etc.) to also reach the

Internet as well. Linux IP Masquerading allows this functionality even if the internal computers do not

have IP addresses.

The IP masquerading can be done by the following steps:

1. The Linux PC must have an internet connection and a connection to LAN. Typically, the Linux PC has

two network interfaces-an Ethernet card for the LAN and a dial-up PPP connection to the Internet

(through an ISP).

2. All other systems on your LAN use the Linux PC as the default gateway for TCP/IP networking. Use the

same ISP-provided DNS addresses on all systems.

3. Enable IP forwarding in the kernel. By default the IP forwarding is not enabled. To ensure that IP

forwarding is enabled when you reboot your system, place this command in the /etc/rc.d/rc.local file.

Page 40: Load Average in Linux

4. Run /sbin/iptables-the IP packet filter administration program-to set up the rules that enable the

Linux PC to masquerade for your LAN.

18. What is the minimum number of partitions you need to install Linux?

Minimum 2 partitions are needed for installing Linux. The one is / or root which contains all the files and

the other is swap. Linux file system is function specific which means that files and folders are organized

according to their functionality. For example, all executables are in one folder, all devices in another, all

libraries in another and so on. / or ‘root’ is the base of this file system. All the other folders are under

this one. / can be consider as C: .Swap is a partition that will be used as virtual memory. If there is no

more available RAM a Linux computer will use an area of the hard disk, called swap, to temporarily store

data. In other words it is a way of expanding your computers RAM.

19. Which command is used to review boot messages?

dmesg command is used to review boot messages. This command will display system messages

contained in the kernel ring buffer. We can use this command immediately 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 oldest

data in it. Its basic syntax is

dmesg [options]

Invoking dmesg without any of its options causes it to write all the kernel messages to standard output.

This usually produces far too many lines to fit into the display screen all at once, and thus only the final

messages are visible. However, the output can be redirected to the less command through the use of a

pipe, thereby allowing the startup messages to be viewed on one screen at a time

Page 41: Load Average in Linux

dmesg | less

20. Which utility is used to make automate rotation of a log?

logrotate command is used to make automate rotation of log.

Syntax of the command is:

logrotate [-dv] [-f|] [-s|] config_file+

It allows automatic rotation, compression, removal, and mailing of log files. This command is mainly

used for rotating and compressing log files. This job is done every day when a log file becomes too large.

This command can also be run by giving on command line. We can done force rotation by giving –f

option with this command in command line. This command is also used for mailing. We can give –m

option for mailing with this command. This option takes two arguments one is subject and other is

recipient name.

21. What are the partitions created on the mail server hard drive?

The main partitions are done firstly which are root, swap and boot partition. But for the mail server

three different partitions are also done which are as follows:

1. /var/spool- This is done so that if something goes wrong with the mail server or spool than the output

cannot overrun the file system.

2. /tmp- putting this on its own partition prevents any user item or software from overrunning the

system files.

3. /home- putting this on its own is useful for system upgrades or reinstalls. It allow not to wipe off

the /home hierarchy along with other areas.

Page 42: Load Average in Linux

22. What are the fields in the/etc/passwd file?

It contains all the information of the users who log into the system. It contains a list of the system's

accounts, giving for each account some useful information like user ID, group ID, home directory, shell,

etc. It should have general read permission as many utilities, like ls use it to map user IDs to user names,

but write access only for the superuser (root). The main fields of /etc/passwd file are:

1. Username: It is used when user logs in. It should be between 1 and 32 characters in length.

2. Password: An x character indicates that encrypted password is stored in /etc/shadow file.

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 file)

5. User ID Info: The comment field. It allow you to add extra information about the users such as user's

full name, phone number etc. This field use by finger command.

6. Home directory: The absolute path to the directory the user will be in when they log in. If this

directory does not exists then users directory becomes /

7. Command/shell: The absolute path of a command or shell (/bin/bash). Typically, this is a shell.

23. Which commands are used to set a processor-intensive job to use less CPU 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 (lowest).Priority is given to a job so that the most

important job is executed first by the kernel and then the other least important jobs. This takes less CPU

Page 43: Load Average in Linux

times as the jobs are scheduled and are given priorities so the CPU executes fast. The priority is given by

numbers like -20 describe the highest priority and 19 describe the least priority.

24. How to change window manager by editing your home directory?

/.xinitrc file allows changing the window manager we want to use when logging into X from that

account. The dot in the file name shows you that the file is a hidden file and doesn't show when you do

a normal directory listing. For setting a window manager we have to save a command in this file. The

syntax of command is: exec windowmanager.After this, save the file. Next time when you run a startx a

new window manager will open and become default. The commands for starting some popular window

managers and desktop environments are:

-KDE = startkde

-Gnome = gnome-session

-Blackbox = blackbox

-FVWM = fvwm

-Window Maker = wmaker

-IceWM = icewm

25. How documentation of an application is stored?

When a new application is installed its documentation is also installed. This documentation is stored

under the directory named for application. For example if my application name is App1 then the path of

the documentation will be /user/doc/App1. It contains all the information about the application. It

contains date of creating application, name of application and other important module of the

application. We can get the basic information of application from the documentation.

Page 44: Load Average in Linux

26. How 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 file /etc/shadow and changes all passwords to ‘x’ in the

/etc/passwd file. First, entries in the shadowed file which don't exist in the main file are removed. Then,

shadowed entries which don't have `x' as the password in the main file are updated. Any missing

shadowed entries are added. Finally, passwords in the main file are replaced with `x'. These programs

can be used for initial conversion as well to update the shadowed file if the main file is edited by hand.

27. How 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 values specified on the

command line and the default values from the system. The new user account will be entered into the

system files as needed, and initial files copied, depending on the command line options. This command

uses the system default as home directory. If –m option is given then the home directory is made.

28. Which password package is installed for the security of central password?

Shadow password packages are used for security of central passwords. Security is the most important

aspect of every operating system. When this package is not installed the user information including

passwords is stored in the /etc/passwd file. The password is stored in an encoded format. These

encoded forms can be easily identified by the System crackers by randomly encoding the passwords

from dictionaries. The Shadow Package solves the problem by relocating the passwords to another file

Page 45: Load Average in Linux

(usually /etc/shadow). The /etc/shadow file is set so that it cannot be read by just anyone. Only root will

be able to read and write to the /etc/shadow file.

29. Which shell do you assign to a POP3 mail-only account?

POP3 mail only account is assigned to the /bin/false shell. However, assigning bash shell to a POP3 mail

only gives user login access, which is avoided. /bin/nologin can also be used. This shell is provided to the

user when we don’t want to give shell access to the user. The user cannot access the shell and it reject

shell login on the server like on telnet. It is mainly for the security of the shells. POP3 is basically used for

downloading mail to mail program. So for illegal downloading of emails on the shell this account is

assigned to the /bin/false shell or /bin/nologin. These both shells are same they both do the same work

of rejecting the user login to the shell. The main difference between these two shells is that false shell

shows the incorrect code and any unusual coding when user login with it. But the nologin shell simply

tells that no such account is available. So nologin shell is used mostly in Linux.

30. Which daemon is responsible for tracking events on Linux system?

syslogd is responsible for tracking system information and save it to the desired log files. It provides two

system utilities which provide system logging and kernel message trapping. Internet and UNIX domain

sockets support enable this utility package to support both local and remote logging. Every logged

message contains at least a time and a hostname field, normally a program name field, too. So to track

these information this daemon is used. syslogd mainly reacts to the set of signals given by the user.

These are the signals given to syslogd: SIGHUP: This lets syslogd perform a re-initialization. All open files

are closed, the configuration file (default is /etc/syslog.conf) will be reread and the syslog facility is

started again. SIGTERM: The syslogd will die. SIGINT, SIGQUIT: If debugging is enabled these are ignored,

otherwise syslogd will die. SIGUSR1: Switch debugging on/off. This option can only be used if syslogd is

started with the - d debug option. SIGCHLD: Wait for Childs if some were born, because of waiting

messages.

Page 46: Load Average in Linux

31. Which daemon is used for scheduling of the commands?

The crontab command is used for scheduling of the commands to run at a later time. SYNTAX

crontab [ -u user ] file

crontab [ -u user ] { -l | -r | -e }

Options

-l List - display the current crontab entries.

-r Remove the current crontab.

-e Edit the current crontab using the editor specified by the VISUAL or EDITOR environment variables.

When user exits from the editor, the modified crontab will be installed automatically. Each user can

have their own crontab, and though these are files in /var, they are not intended to be edited directly. 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 will display the crontab of the user who is executing the command.

32. How environment variable is set so that the file permission can be automatically set to the newly

created files?

umask command is used to set file permission on newly created files automatically.

Syntax

Page 47: Load Average in Linux

umask [-p] [-S] [mode]

It is represented in octal numbers. We can simply use this command without arguments to see the

current file permissions. To change the permissions, mode is given in the arguments. The default umask

used for normal user is 0002. The default umask for the root user is 0022. For calculating the original

values, the values shown by the umask must be subtracted by the default values. It is mainly used for

masking of the file and directory permission. The /etc/profile script is where the umask command is

usually set for all users. The –S option can be used to see the current default permissions displayed in

the alpha symbolic format.

For example, umask 022 ensures that new files will have at most 755 permissions (777 NAND 022).

The permissions can be calculated by taking the NAND of original value with the default values of files

and directories.

Linux interview - August 21, 2008 at 22:00 pm by Rajmeet Ghai

What is Linux and why is it so popular?

Answer - Linux is an operating system that uses UNIX like Operating system.......

Unix interview questions with answers

Discuss the mount and unmount system calls, What are the process states in Unix?, What is use of sed

command?, What is 'inode'?,What are the Unix system calls for I/O?, How are devices represented in

UNIX?, Brief about the directory representation in UNIX ......

What is LILO?

Page 48: Load Average in Linux

Answer - LILO is Linux Loader is a boot loader for Linux. It is used to load Linux into the memory and

start the Operating system.......

What is the difference between home directory and working directory?

Answer - Home directory is the default working directory when a user logs in. On the other hand,

working directory is the user’s current directory.......

What is the difference between internal and external commands?

Answer - Internal commands are commands that are already loaded in the system. They can be

executed any time and are independent.......

Explain the difference between a static library and a dynamic library.

Answer - Static libraries are loaded when the program is compiled and dynamically-linked libraries are

loaded in while......

What is LD_LIBRARY_PATH?

Answer - LD_LIBRARY_PATH is an environment variable. It is used for debugging a new library or a non

standard library.......

Page 49: Load Average in Linux

What is the file server in Linux server?

Answer - File server is used for file sharing. It enables the processes required fro sharing.......

What is NFS? What is its purpose?

Answer - NFS is Network File system. It is a file system used for sharing of files over a network.......

How do I send email with linux?

Answer - Email can be sent in Linux using the mail command. ......

Explain RPM (Red Hat Package Manager) features.

Answer - RPM is a package managing system (collection of tools to manage software packages).......

What is Kernel? Explain the task it performs.

Answer - Kernel is used in UNIX like systems and is considered to be the heart of the operating

system.......

Page 50: Load Average in Linux

What is Linux Shell? What is Shell Script?

Answer - Linux shell is a user interface used for executing the commands. Shell is a program the user......

What are Pipes? Explain use of pipes.

Answer - A pipe is a chain of processes so that output of one process (stdout) is fed an input (stdin) to

another.......

Explain trap command; shift Command, getopts command of linux.

Answer - Trap command: controls the action to be taken by the shell when a signal is received. ......

What Stateless Linux server? What feature it offers?

Answer - A stateless Linux server is a centralized server in which no state exists on the single

workstations. ......

What does nslookup do? Explain its two modes.

Answer - Nslookup is used to find details related to a Domain name server. Details like IP addresses of a

machine, MX records,......

Page 51: Load Average in Linux

What is Bash Shell?

Answer - Bash is a free shell for UNIX. It is the default shell for most UNIX systems. It has a combination

of the C and Korn shell features. ......

Explain some Network-Monitoring Tools in Linux: ping, traceroute, tcpdump, ntop

Answer - Network monitoring tools are used to monitor the network, systems present on the network,

traffic etc.......

How does the linux file system work?

Answer - Linux file structure is a tree like structure. It starts from the root directory, represented by '/',

and then expands into sub-directories.......

What are the process states in Linux?

Answer - Process states in Linux.......

What is a zombie?

Answer - Zombie is a process state when the child dies before the parent process. In this case the

structural information of the process is still in the process table.......

Page 52: Load Average in Linux

Explain each system calls used for process management in linux.

Answer - System calls used for Process management......