Thursday 24 September 2015

Latest Linux Interview Questions and Answers

21. How to make USB bootable?
Write efidisk.img from RHEL 6 DVD images/ subdirectory to USB
dd if=efidisk.img of=/dev/usb (usb device name)

22.  How can we check disk/device status/failure/errors using smartctl utility?
Try following to check:
        Enable/Disable SMART on device/disk : smartctl -s on /dev/sda
        Check device SMART health : smartctl -H /dev/sda
        Check device SMART capabilities : smartctl -c /dev/sda
        Enable/Disable automatic offline testing on device : smartctl -o on/off /dev/sda
        Show device SMART vendor-specific Attributes and values : smartctl -A /dev/sda
        Show device log [TYPE : error, selftest, selective, directory,background,
                                     scttemp[sts,hist]] : smartctl -l TYPE /dev/sda
        Run test on device [TEST: offline short long conveyance select,M-N pending,N
                                     afterselect,[on|off] scttempint,N[,p] : smartctl -t /dev/sda

23. What is the difference between ext2 vs ext3 vs ext4?
 - dear friends read our next blog to get diffrences.

24. Disable ping to avoid network/ICMP flood
Set following in /etc/sysctl.conf : net.ipv4.icmp_echo_ignore_all = 1
      Then "sysctl -p"
      or
   echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_all

24.  What is SYN Flood, ICMP Flood
SYN Flood :
A SYN flood occurs when a host sends a flood of TCP/SYN packets, often with a fake/forged sender address. Each of these packets is handled like a connection request, causing the server to spawn a half-open connection, by sending back a TCP/SYN-ACK packet(Acknowledge), and waiting for a packet in response from the sender address(response to the ACK Packet). However, because the sender address is forged, the response never comes. These half-open connections saturate the number of available connections the server is able to make, keeping it from responding to legitimate requests until after the attack ends
ICMP Flood : There are three types of ICMP Flood :
1) Smurf Attack : http://en.wikipedia.org/wiki/Smurf_attack
2) Ping Flood :  http://en.wikipedia.org/wiki/Ping_flood
3) Ping of Death : http://en.wikipedia.org/wiki/Ping_of_death

25. How to setup Password less remote login/ssh?
Use "ssh-keygen -t dsa or rsa" at local system for creating public and private keys
       Then copy /root/.ssh/id_dsa.pub to remote_server by name /root/.ssh/authorized_keys
        Change permissions of /root/.ssh/authorized_keys file at remote_server "chmod 0600 ~/.ssh/authorized_keys"
        Now try to login from local system to remote_server "ssh root@remote_server"

More Questions & Answers:-
Page1 Page2 Page3 Page4 Page5 Page6 Page7 Page8 Page9 
Page10 Page11

No comments:

Post a Comment