SlideShare a Scribd company logo
7/2/2015 Linux Server World | Linux Interview Questions and Answers – Part 2
http://linuxserverworld.com/linux-interview-questions-and-answers-part-2/ 1/10
Linux Interview Questions
and Answers – Part 2
POST CATEGORY ­ INTERVIEW Q&A, UNCATEGORIZED ∙ 2
COMMENTS
1. What is the difference between service and process?
A process is any piece of software that is running on a computer.
For example, your anti­virus software runs in the background as a
process,  which  was  automatically  started  when  the  computer
booted. Some processes start when your computer boots, others
are started manually when needed.
Some  processes  are  services  that  publish  methods  to  access
them,  so  other  programs  can  call  them  as  needed.  Printing
services would be an example of a service type of process, where
your email program can just call the print services process to say
it wants to print, and the service does the actual work.
2. How to view crond status? If it’s show service is not found.
Service crond restart
3.  My  clients  are  getting  services  from  servers  but  how  to
know which client is using which service. is there any files to
keep information about these? Clients used ftp, nis, samba,
apache, squid, nfs and mail services how to know how many
users got service from server side with date, time and client
system ip?
SUBSCRIBE FOR
EMAIL
Email
Subscribe
FIND US ON GOOGLE +
Linux Server Wo
+ 159
Follow
RECENT POSTS
How to install apache
httpd on ubuntu­
11.04/ubuntu­12.04 from
LINUX INTERVIEW QUESTIONS AND ANSWERS –
PART I
HOW TO CONFIGURE NAGIOS ON RHEL 6/CENTOS 6
FROM SOURCE
Find us on Facebook
Linux Server World
3,482 people like Linux Server World
Facebook social plugin
Like
7/2/2015 Linux Server World | Linux Interview Questions and Answers – Part 2
http://linuxserverworld.com/linux-interview-questions-and-answers-part-2/ 2/10
Mail server – /var/log/mail/maillog [RedHat,centos]
ssh – /var/log/secure
Apache – /var/log/http/access.log
nfs – /var/lib/nfs/rmtab
4.  How  to  FTP  user  access  other  directory  except  his  own
home directory?
vim /etc/vsftpd/vsftpd.conf
Chroot_list_enable=yes
5. What are the Linux­based security tools?
Selinux
Firewall
iptables
Tcp­wrappers
6. What are the basic elements of firewall?
A firewall should be able to filter packets (drop/pass them) based
on certain rules specified by the user. The rules may be used to
identify  an  incoming  packet  to  the  computer  or  outgoing  packet
from the computer, it can be based on target port number/ip add ,
traffic from a particular Network card etc…
The firewall rules can be in a tabular form (saved on the disk) from
where  the  firewall  software  can  read  them  and  implement  it.
iptables firewall on Linux is a great example
7. What is a command to display top 10 users who are using
huge space?
du ­sh /home/* | sort ­r | head ­10
8. How do find all failed login attempts via ssh?
tail ­f /var/log/secure | grep Failed
9. How do you configure Linux system as a router?
vim /etc/sysctl.conf
net.ipv4.ip_forward=1
system­config­network
eth0 192.168.1.120 eth0:1 172.24.0.1
source
How to run shell
commands in python
How to send an email
through python script
How to send an email with
attachment through Shell
script
How to install Nagios with
NRPE on Centos 6/RHEL
6
How to configure Nagios
on RHEL 6/CENTOS 6
from source
Linux Interview Questions
and Answers – Part 2
Linux Interview Questions
and Answers – Part I
What is a shell in
linux/unix ?
Python programming for
the absolute beginners
How to add new order
admin email notification on
Magento
ISCSI storage
management – A Storage
Area Network Protocol
MySQL performance
tuning with mysqltuner
perl script
How to flush postfix mail
queue and its various
operations
IPMI Interface – A
Intelligent Platform
Management Interface
Now Linux runs on
Windows Azure Platform
MySql basics for
beginners
SFTP Chroot Jailing –
Restricting users to their
individual home directories
How to split a file on linux
How to prevent users from
7/2/2015 Linux Server World | Linux Interview Questions and Answers – Part 2
http://linuxserverworld.com/linux-interview-questions-and-answers-part-2/ 3/10
255.255.255.0 255.255.0.0
172.24.0.1 192.168.1.120
10. What is the UID and GID of root user? Can a normal user
can change the ownership of a file? What is the command to
change ownership of a file?
The  root  UID/GID  is  0  (zero).  Which  is  why  he  can  able  to
intervene  in  all  normal  users  files  even  though  he  don’t  had
permission.  A  normal  user  will  don’t  have  the  permission  to
change ownership of file. The command to change ownership is <
chown user.user file >
11. What is the diff b/w ext2 and ext3?
Ext3  is  a  tiny  bit  slower  than  ext2  is,  but  it  holds  tremendous
advantages. There is really only one difference between ext2 and
ext3,  and  that  is  that  ext3  uses  a  journal  to  prevent  filesystem
corruption  in  the  case  of  an  unclean  shutdown  (ie.  before  the
filesystem is synced to disk). That makes ext3 a bit slower than
ext2  since  all  metadata  changes  are  written  to  the  journal,  and
then flushed to disk, but on the other hand you don’t risk having
the entire filesystem destroyed at power failure or if an unwitted
person turns the computer off uncleanly. You don’t have to check
the  filesystem  after  an  unclean  shutdown  either.  Ext3  has  three
levels  of  journalling.  Metadata  (ie.  internal  filesystem  structures)
are  always  journalled,  so  that  the  filesystem  itself  is  never
corrupted.  How  ordinary  data  is  written  to  the  file  system  is
controllable,  though.  The  default  option  is  the  “ordered”  mode,
which causes file contents to be written to the filesystem before
metadata  is  even  committed  to  the  journal.  The  highest  reliable
mode  is  called  the  “journal”  mode,  which  causes  file  data  to  be
committed to the journal before it is flushed to its final place, like
the  metadata.  The  least  reliable  mode,  but  rumoured  to  be  the
fastest, is called the “writeback” mode, which makes no promises
at  all  regarding  the  consistency  of  file  data.  Only  metadata  is
output  reliably  in  writeback  mode.  So  as  for  anything  else,  it’s
mainly  a  matter  of  priority.  If  you  don’t  want  ultimate  speed,  go
with  ext3.  If  you  need  the  highest  speed  that  is  theoratically
aquirable though, then go with ext2. For that to be effective you’ll
probably need a really advanced hard drive controller, though.
12.  As  the  system  administrator  you  need  to  review  Bob’s
cronjobs. What command would you use?
crontab –lu Bob
changing their password
on linux
7/2/2015 Linux Server World | Linux Interview Questions and Answers – Part 2
http://linuxserverworld.com/linux-interview-questions-and-answers-part-2/ 4/10
13. What command is used to remove the password assigned
to a group?
gpasswd –r groupname
14. What are the different RAID levels?
 RAID level 0
 RAID level RAID level 1
 RAID level 2
 RAID level 3
 RAID level 4
 RAID level 5
 RAID level 6
 RAID level 10
 RAID level 50
15. How do you create a swapfile?
dd if=/dev/zero of=/swapfile bs=1024 count=200M
mkswap /swapfile
swapon /swapfile
16. What does nslookup do?
Nslookup  is  a  program  used  to  find  information  about  internet
Domain Name server.
The two modes of nslookup are: Interactive and non­interactive.
Using ‘interactive mode’ user can query the name servers for the
information pertaining to hosts and domains.
Using ‘non­interactive mode’ the user can just print the name and
requested information of a host.
17. What is the difference between UDP and TCP?
TCP is a Transmission Control Protocol.
UDP is a User Datagram Protocol.
There are four major differences between UDP and TCP:
1. TCP can establish a Connection and UDP cannot.
2. TCP provides a stream of unlimited length, UDP sends Small
packets.
7/2/2015 Linux Server World | Linux Interview Questions and Answers – Part 2
http://linuxserverworld.com/linux-interview-questions-and-answers-part-2/ 5/10
3.TCP gurantees that as long as you have a connection data sent
will arrive at the destination, UDP provides not guarantee delivery.
4.UDP  is  faster  for  sending  small  amounts  of  data  since  no
connection  setup  is  required,  the  data  can  be  sent  in  less  time
then it takes for TCP to establish a connection.
18.  What  command  do  you  run  to  check  file  system
consistency?
Need  to  run  fsck  [file  system  consistency  check]  command  to
check  file  system  consistency  and  repair  a  Linux  /  UNIX  file
system.
fsck
19. What is the command to remove Lvm ,Pv and vg
1st remove the entry on /etc/fstab file & save – quit.
2nd remove LVM – lvremove lvname
3rd remove VG – vgremove vgname
4th remove PV – pvremove pvname
20. How to create SAMBA server in fedora 9 Linux?
yum install samba ­y
yum install samba­swat –y
vi /etc/samba/smb.conf
comment = windows sharing
path = path/your/share/directory
valid users = surendra
writable = yes
browseable = yes
then type testparm for code testing.
smbpasswd ­a username
smbpasswd ­e username
service smb restart
chkconfig smb on
7/2/2015 Linux Server World | Linux Interview Questions and Answers – Part 2
http://linuxserverworld.com/linux-interview-questions-and-answers-part-2/ 6/10
21. How to schedule cron backup to run on 4th Saturday of
month?
* * * * 6 weekdaynum 4 && sh /backup/test.sh
22. What is an inode?
ext2 and ext3 file systems keep a list of the files they contain in a
table called an inode table. The inode is referenced by its number.
This is unique within a file system.
The  inode  contains  the  metadata  about  files.  Among  the  data
stored in the inode is
File type
File permissions
Link count
User ID number of the file owner and the group ID number of the
associated group
Last modification time
Location of the data on the hard disk
Other metadata about the file
ls ­li – view inode number only
stat /etc/passwd – view inode details
23. How to see unallocated hard disk space on linux
df ­h
24.  How  do  u  find  remote  machine  operating  system  and
version?
nmap ­A –v 192.168.1.100
25. How do you port scanning with netstat command?
netstat –an
7/2/2015 Linux Server World | Linux Interview Questions and Answers – Part 2
http://linuxserverworld.com/linux-interview-questions-and-answers-part-2/ 7/10
26. Linux system monitoring Tools?
top – Process Activity Command
vmstat – System Activity, Hardware and System Information
w – Find out Who Is Logged on And What They Are Doing
Uptime – Tell How Long the System Has Been Running
ps – Displays the Processes
free – Memory Usage
iostat – Average CPU Load, Disk Activity
sar – Collect and Report System Activity
mpstat – Multiprocessor Usage
pmap – Process Memory Usage
27. Linux Network monitoring Tools?
netstat and ss – Network Statistics
iptraf – Real­time Network Statistics
tcpdump – Detailed Network Traffic Analysis
strace – System Calls
/Proc file system – Various Kernel Statistics
# cat /proc/cpuinfo
# cat /proc/meminfo
# cat /proc/zoneinfo
# cat /proc/mounts
Nagios – Server And Network Monitoring
Cacti – Web­based Monitoring Tool
Gnome  System  Monitor  –  Real­time  Systems  Reporting  and
Graphing
28. What is mean by system calls?
A system call is the mechanism used by an application program to
request service from the operating system.
On Unix­based and POSIX­based systems, popular system calls
are open, read, write, close, wait, exec, fork, exit, and kill. Many of
today’s  operating  systems  have  hundreds  of  system  calls.  For
example,  Linux  has  319  different  system  calls.  FreeBSD  has
about  the  same  (almost  330).  Tools  such  as  strace  and  truss
report the system calls made by a running process.
29. Important port no:
7/2/2015 Linux Server World | Linux Interview Questions and Answers – Part 2
http://linuxserverworld.com/linux-interview-questions-and-answers-part-2/ 8/10
SHARE →
NFS – 2049
FTP – 21
SAMBA – 445
SSH – 22
DNS – 53
POP3 – 110
IMAP – 143
HTTPS – 443
HTTP – 80
30. How do u extract files from iso cd images in linux?
mount –o loop disk1.iso /mnt/iso
TAGGED WITH →  answer • answers • interview • linux • question •
questions 
1   Tweet 0  
2 Responses to Linux Interview
Questions and Answers – Part 2
Sivakumar M says:
February 19, 2014 at 8:45 AM
Answer of 2nd question is # service crond
status
Firoj says:
February 26, 2014 at 1:55 PM
Got to knw new thngs.thanx a lot
Leave a Reply
36Like
Share
REPLY
REPLY

More Related Content

PPTX
linux interview questions and answers
PPTX
Linux Administrator - The Linux Course on Eduonix
DOCX
Linux admin interview questions
PPT
Linux Interview Questions Quiz
PDF
Linux Interview Questions And Answers | Linux Administration Tutorial | Linux...
KEY
Linux beginner's Workshop
PDF
basic linux command (questions)
PDF
LINUX Admin Quick Reference
linux interview questions and answers
Linux Administrator - The Linux Course on Eduonix
Linux admin interview questions
Linux Interview Questions Quiz
Linux Interview Questions And Answers | Linux Administration Tutorial | Linux...
Linux beginner's Workshop
basic linux command (questions)
LINUX Admin Quick Reference

What's hot (20)

PDF
An Introduction To Linux
PDF
Linux practicals T.Y.B.ScIT
PDF
Linux Tutorial For Beginners | Linux Administration Tutorial | Linux Commands...
PPTX
Linux Presentation
PPT
Linux presentation
PPT
Linux administration classes in mumbai
PPTX
Linux basics part 1
PPT
Linux Administration
PPT
Linux commands
DOC
Some basic unix commands
PPT
Linux lesson
PPT
A Quick Introduction to Linux
PDF
Linux Command Line Basics
PDF
Linux Presentation
PPT
Linux
ODP
Linux commands
PDF
Lavigne bsdmag apr13
DOCX
Linux basic commands tutorial
PPTX
Linux commands
PDF
Linux Training For Beginners | Linux Administration Tutorial | Introduction T...
An Introduction To Linux
Linux practicals T.Y.B.ScIT
Linux Tutorial For Beginners | Linux Administration Tutorial | Linux Commands...
Linux Presentation
Linux presentation
Linux administration classes in mumbai
Linux basics part 1
Linux Administration
Linux commands
Some basic unix commands
Linux lesson
A Quick Introduction to Linux
Linux Command Line Basics
Linux Presentation
Linux
Linux commands
Lavigne bsdmag apr13
Linux basic commands tutorial
Linux commands
Linux Training For Beginners | Linux Administration Tutorial | Introduction T...
Ad

Viewers also liked (19)

PDF
Top 100 Linux Interview Questions and Answers 2014
PDF
Ben c udemy_linux_alternatives_to_windows
PDF
Linux Recovery
PDF
Backup and restore in linux
PDF
Digitale Signatur mit eEvolution
PPTX
Conference_20130305_Helen Goulden
PDF
Collective buying platform
PDF
Revista saude familia27
PPT
barça
PDF
Cascos para moto
PPTX
Fundamentals of economics in abms switzerland university
PPT
Avaya Best Practices In Communications Mobility
PPT
Captia doppleracadamy 2012
PPSX
Jose Bello "El Cantautor"
PDF
Fallo sobreseimiento Martín Redrado
PPTX
Volcanes
DOC
Descripción y form. inscripción proyecto Las voces de los Jóvenes 2011- 2012
PDF
Informe Cotec 2012 Tecnología e Innovación en España
Top 100 Linux Interview Questions and Answers 2014
Ben c udemy_linux_alternatives_to_windows
Linux Recovery
Backup and restore in linux
Digitale Signatur mit eEvolution
Conference_20130305_Helen Goulden
Collective buying platform
Revista saude familia27
barça
Cascos para moto
Fundamentals of economics in abms switzerland university
Avaya Best Practices In Communications Mobility
Captia doppleracadamy 2012
Jose Bello "El Cantautor"
Fallo sobreseimiento Martín Redrado
Volcanes
Descripción y form. inscripción proyecto Las voces de los Jóvenes 2011- 2012
Informe Cotec 2012 Tecnología e Innovación en España
Ad

Similar to Linux server world (20)

DOCX
Operating system
PPT
Sak os
PDF
Why software performance reduces with time?.pdf
PPTX
Introduction to Network and System Administration
TXT
Interview questions
PPTX
20 Windows Tools Every SysAdmin Should Know
PDF
IRJET- Real Time Monitoring of Servers with Prometheus and Grafana for High A...
PDF
Analysis Of Process Structure In Windows Operating System
DOCX
Hari proposal
ODP
Planning Optimal Lotus Quickr services for Portal (J2EE) Deployments
PDF
Linux Internals - Interview essentials - 1.0
PDF
Redhat Linux server administration industrial training report.
PPTX
System software and its types
PPT
PPT
PCD - Process control daemon - Presentation
PDF
Systemd for administrators
PDF
Systemd for administrators
DOCX
DominoMigrationProposal
PPTX
Black And White Minimal Architecture Portfolio Presentation.pptx
PPTX
Process and threads
Operating system
Sak os
Why software performance reduces with time?.pdf
Introduction to Network and System Administration
Interview questions
20 Windows Tools Every SysAdmin Should Know
IRJET- Real Time Monitoring of Servers with Prometheus and Grafana for High A...
Analysis Of Process Structure In Windows Operating System
Hari proposal
Planning Optimal Lotus Quickr services for Portal (J2EE) Deployments
Linux Internals - Interview essentials - 1.0
Redhat Linux server administration industrial training report.
System software and its types
PCD - Process control daemon - Presentation
Systemd for administrators
Systemd for administrators
DominoMigrationProposal
Black And White Minimal Architecture Portfolio Presentation.pptx
Process and threads

Linux server world

  • 1. 7/2/2015 Linux Server World | Linux Interview Questions and Answers – Part 2 http://linuxserverworld.com/linux-interview-questions-and-answers-part-2/ 1/10 Linux Interview Questions and Answers – Part 2 POST CATEGORY ­ INTERVIEW Q&A, UNCATEGORIZED ∙ 2 COMMENTS 1. What is the difference between service and process? A process is any piece of software that is running on a computer. For example, your anti­virus software runs in the background as a process,  which  was  automatically  started  when  the  computer booted. Some processes start when your computer boots, others are started manually when needed. Some  processes  are  services  that  publish  methods  to  access them,  so  other  programs  can  call  them  as  needed.  Printing services would be an example of a service type of process, where your email program can just call the print services process to say it wants to print, and the service does the actual work. 2. How to view crond status? If it’s show service is not found. Service crond restart 3.  My  clients  are  getting  services  from  servers  but  how  to know which client is using which service. is there any files to keep information about these? Clients used ftp, nis, samba, apache, squid, nfs and mail services how to know how many users got service from server side with date, time and client system ip? SUBSCRIBE FOR EMAIL Email Subscribe FIND US ON GOOGLE + Linux Server Wo + 159 Follow RECENT POSTS How to install apache httpd on ubuntu­ 11.04/ubuntu­12.04 from LINUX INTERVIEW QUESTIONS AND ANSWERS – PART I HOW TO CONFIGURE NAGIOS ON RHEL 6/CENTOS 6 FROM SOURCE Find us on Facebook Linux Server World 3,482 people like Linux Server World Facebook social plugin Like
  • 2. 7/2/2015 Linux Server World | Linux Interview Questions and Answers – Part 2 http://linuxserverworld.com/linux-interview-questions-and-answers-part-2/ 2/10 Mail server – /var/log/mail/maillog [RedHat,centos] ssh – /var/log/secure Apache – /var/log/http/access.log nfs – /var/lib/nfs/rmtab 4.  How  to  FTP  user  access  other  directory  except  his  own home directory? vim /etc/vsftpd/vsftpd.conf Chroot_list_enable=yes 5. What are the Linux­based security tools? Selinux Firewall iptables Tcp­wrappers 6. What are the basic elements of firewall? A firewall should be able to filter packets (drop/pass them) based on certain rules specified by the user. The rules may be used to identify  an  incoming  packet  to  the  computer  or  outgoing  packet from the computer, it can be based on target port number/ip add , traffic from a particular Network card etc… The firewall rules can be in a tabular form (saved on the disk) from where  the  firewall  software  can  read  them  and  implement  it. iptables firewall on Linux is a great example 7. What is a command to display top 10 users who are using huge space? du ­sh /home/* | sort ­r | head ­10 8. How do find all failed login attempts via ssh? tail ­f /var/log/secure | grep Failed 9. How do you configure Linux system as a router? vim /etc/sysctl.conf net.ipv4.ip_forward=1 system­config­network eth0 192.168.1.120 eth0:1 172.24.0.1 source How to run shell commands in python How to send an email through python script How to send an email with attachment through Shell script How to install Nagios with NRPE on Centos 6/RHEL 6 How to configure Nagios on RHEL 6/CENTOS 6 from source Linux Interview Questions and Answers – Part 2 Linux Interview Questions and Answers – Part I What is a shell in linux/unix ? Python programming for the absolute beginners How to add new order admin email notification on Magento ISCSI storage management – A Storage Area Network Protocol MySQL performance tuning with mysqltuner perl script How to flush postfix mail queue and its various operations IPMI Interface – A Intelligent Platform Management Interface Now Linux runs on Windows Azure Platform MySql basics for beginners SFTP Chroot Jailing – Restricting users to their individual home directories How to split a file on linux How to prevent users from
  • 3. 7/2/2015 Linux Server World | Linux Interview Questions and Answers – Part 2 http://linuxserverworld.com/linux-interview-questions-and-answers-part-2/ 3/10 255.255.255.0 255.255.0.0 172.24.0.1 192.168.1.120 10. What is the UID and GID of root user? Can a normal user can change the ownership of a file? What is the command to change ownership of a file? The  root  UID/GID  is  0  (zero).  Which  is  why  he  can  able  to intervene  in  all  normal  users  files  even  though  he  don’t  had permission.  A  normal  user  will  don’t  have  the  permission  to change ownership of file. The command to change ownership is < chown user.user file > 11. What is the diff b/w ext2 and ext3? Ext3  is  a  tiny  bit  slower  than  ext2  is,  but  it  holds  tremendous advantages. There is really only one difference between ext2 and ext3,  and  that  is  that  ext3  uses  a  journal  to  prevent  filesystem corruption  in  the  case  of  an  unclean  shutdown  (ie.  before  the filesystem is synced to disk). That makes ext3 a bit slower than ext2  since  all  metadata  changes  are  written  to  the  journal,  and then flushed to disk, but on the other hand you don’t risk having the entire filesystem destroyed at power failure or if an unwitted person turns the computer off uncleanly. You don’t have to check the  filesystem  after  an  unclean  shutdown  either.  Ext3  has  three levels  of  journalling.  Metadata  (ie.  internal  filesystem  structures) are  always  journalled,  so  that  the  filesystem  itself  is  never corrupted.  How  ordinary  data  is  written  to  the  file  system  is controllable,  though.  The  default  option  is  the  “ordered”  mode, which causes file contents to be written to the filesystem before metadata  is  even  committed  to  the  journal.  The  highest  reliable mode  is  called  the  “journal”  mode,  which  causes  file  data  to  be committed to the journal before it is flushed to its final place, like the  metadata.  The  least  reliable  mode,  but  rumoured  to  be  the fastest, is called the “writeback” mode, which makes no promises at  all  regarding  the  consistency  of  file  data.  Only  metadata  is output  reliably  in  writeback  mode.  So  as  for  anything  else,  it’s mainly  a  matter  of  priority.  If  you  don’t  want  ultimate  speed,  go with  ext3.  If  you  need  the  highest  speed  that  is  theoratically aquirable though, then go with ext2. For that to be effective you’ll probably need a really advanced hard drive controller, though. 12.  As  the  system  administrator  you  need  to  review  Bob’s cronjobs. What command would you use? crontab –lu Bob changing their password on linux
  • 4. 7/2/2015 Linux Server World | Linux Interview Questions and Answers – Part 2 http://linuxserverworld.com/linux-interview-questions-and-answers-part-2/ 4/10 13. What command is used to remove the password assigned to a group? gpasswd –r groupname 14. What are the different RAID levels?  RAID level 0  RAID level RAID level 1  RAID level 2  RAID level 3  RAID level 4  RAID level 5  RAID level 6  RAID level 10  RAID level 50 15. How do you create a swapfile? dd if=/dev/zero of=/swapfile bs=1024 count=200M mkswap /swapfile swapon /swapfile 16. What does nslookup do? Nslookup  is  a  program  used  to  find  information  about  internet Domain Name server. The two modes of nslookup are: Interactive and non­interactive. Using ‘interactive mode’ user can query the name servers for the information pertaining to hosts and domains. Using ‘non­interactive mode’ the user can just print the name and requested information of a host. 17. What is the difference between UDP and TCP? TCP is a Transmission Control Protocol. UDP is a User Datagram Protocol. There are four major differences between UDP and TCP: 1. TCP can establish a Connection and UDP cannot. 2. TCP provides a stream of unlimited length, UDP sends Small packets.
  • 5. 7/2/2015 Linux Server World | Linux Interview Questions and Answers – Part 2 http://linuxserverworld.com/linux-interview-questions-and-answers-part-2/ 5/10 3.TCP gurantees that as long as you have a connection data sent will arrive at the destination, UDP provides not guarantee delivery. 4.UDP  is  faster  for  sending  small  amounts  of  data  since  no connection  setup  is  required,  the  data  can  be  sent  in  less  time then it takes for TCP to establish a connection. 18.  What  command  do  you  run  to  check  file  system consistency? Need  to  run  fsck  [file  system  consistency  check]  command  to check  file  system  consistency  and  repair  a  Linux  /  UNIX  file system. fsck 19. What is the command to remove Lvm ,Pv and vg 1st remove the entry on /etc/fstab file & save – quit. 2nd remove LVM – lvremove lvname 3rd remove VG – vgremove vgname 4th remove PV – pvremove pvname 20. How to create SAMBA server in fedora 9 Linux? yum install samba ­y yum install samba­swat –y vi /etc/samba/smb.conf comment = windows sharing path = path/your/share/directory valid users = surendra writable = yes browseable = yes then type testparm for code testing. smbpasswd ­a username smbpasswd ­e username service smb restart chkconfig smb on
  • 6. 7/2/2015 Linux Server World | Linux Interview Questions and Answers – Part 2 http://linuxserverworld.com/linux-interview-questions-and-answers-part-2/ 6/10 21. How to schedule cron backup to run on 4th Saturday of month? * * * * 6 weekdaynum 4 && sh /backup/test.sh 22. What is an inode? ext2 and ext3 file systems keep a list of the files they contain in a table called an inode table. The inode is referenced by its number. This is unique within a file system. The  inode  contains  the  metadata  about  files.  Among  the  data stored in the inode is File type File permissions Link count User ID number of the file owner and the group ID number of the associated group Last modification time Location of the data on the hard disk Other metadata about the file ls ­li – view inode number only stat /etc/passwd – view inode details 23. How to see unallocated hard disk space on linux df ­h 24.  How  do  u  find  remote  machine  operating  system  and version? nmap ­A –v 192.168.1.100 25. How do you port scanning with netstat command? netstat –an
  • 7. 7/2/2015 Linux Server World | Linux Interview Questions and Answers – Part 2 http://linuxserverworld.com/linux-interview-questions-and-answers-part-2/ 7/10 26. Linux system monitoring Tools? top – Process Activity Command vmstat – System Activity, Hardware and System Information w – Find out Who Is Logged on And What They Are Doing Uptime – Tell How Long the System Has Been Running ps – Displays the Processes free – Memory Usage iostat – Average CPU Load, Disk Activity sar – Collect and Report System Activity mpstat – Multiprocessor Usage pmap – Process Memory Usage 27. Linux Network monitoring Tools? netstat and ss – Network Statistics iptraf – Real­time Network Statistics tcpdump – Detailed Network Traffic Analysis strace – System Calls /Proc file system – Various Kernel Statistics # cat /proc/cpuinfo # cat /proc/meminfo # cat /proc/zoneinfo # cat /proc/mounts Nagios – Server And Network Monitoring Cacti – Web­based Monitoring Tool Gnome  System  Monitor  –  Real­time  Systems  Reporting  and Graphing 28. What is mean by system calls? A system call is the mechanism used by an application program to request service from the operating system. On Unix­based and POSIX­based systems, popular system calls are open, read, write, close, wait, exec, fork, exit, and kill. Many of today’s  operating  systems  have  hundreds  of  system  calls.  For example,  Linux  has  319  different  system  calls.  FreeBSD  has about  the  same  (almost  330).  Tools  such  as  strace  and  truss report the system calls made by a running process. 29. Important port no:
  • 8. 7/2/2015 Linux Server World | Linux Interview Questions and Answers – Part 2 http://linuxserverworld.com/linux-interview-questions-and-answers-part-2/ 8/10 SHARE → NFS – 2049 FTP – 21 SAMBA – 445 SSH – 22 DNS – 53 POP3 – 110 IMAP – 143 HTTPS – 443 HTTP – 80 30. How do u extract files from iso cd images in linux? mount –o loop disk1.iso /mnt/iso TAGGED WITH →  answer • answers • interview • linux • question • questions  1   Tweet 0   2 Responses to Linux Interview Questions and Answers – Part 2 Sivakumar M says: February 19, 2014 at 8:45 AM Answer of 2nd question is # service crond status Firoj says: February 26, 2014 at 1:55 PM Got to knw new thngs.thanx a lot Leave a Reply 36Like Share REPLY REPLY