Top Ten Linux Interview Questions

By having the perfect answer the Top Ten Linux Interview Questions you can ace any Linux Interview. I’ve been working as a Freelance Linux Consultant for the past seven years. Over all those years, I’ve been in more than a dozen of roles, attended tens of face-to-face interviews and probably close to a hundred of phone interviews.

Few painfully obvious things struck me during my time:

1) Your encyclopedic knowledge of Linux is far more likely to get you a job than your actual problem solving skills.
2) Technical questions asked during phone interviews and even face-to-face interviews tend to be fairly basic. Employers rarely ever go into detailed technical scenarios.
3) You will be asked almost the same technical questions at almost all interviews you attend.

This means that even if you feel your knowledge of Linux is limited at the moment, make sure to know detailed answers to the following Top Linux Interview Questions and you double your chances of getting the job.

You are virtually guaranteed that at least half of the questions asked will sound very similar to the following (I tried to provide the simplest ways to answer these as well, for full answers please refer to http://www.linuxinterviewquestions.com):

1) What is the difference between TCP and UDP?

The basic difference is that TCP establishes a connection before sending data and this allows it to control the dataflow and guarantee that all packets get delivered. UDP simply chucks datagrams onto the wire and if some get lost or arrive in bad order there’s no way to request a resend. However UDP has low network overhead so some services such as DNS resolution, SNMP, DHCP, RIP and VOIP use UDP for its speed and any errors are usually dealt with on the application layer rather than network layer.

2) What is the TCP hand shake?

TCP requires three packets to set up a socket connection, before any user data can be sent. This is called the tree way TCP handshake. First the requester sends a SYN packet and expects a SYN-ACK packet, to which the initiator replies with ACK packet plus the first chunk of user data. From there on the TCP connection is established and two sides exchange user data using features such as message acknowledgment, retransmission and timeout.

3) How does DNS resolution work?

A client application requests an IP address from the name server usually by connecting to UDP port 53. The name server will attempt to resolve the FQDN based on its resolver library, which may contain authoritative information about the host requested or cached data about that name from an earlier query. If the name server does not already have the answer, it will turn to root name servers to determine the authoritative for the FQDN in question. Then, with that information, it will query the authoritative name servers for that name to determine the IP address.

4) What is an MX record?

MX record numerically ranks the mail servers you would prefer to receive email for a domain. The MX record with the lowest number is preferred over the others, but you can set multiple email servers with the same value for simple load balancing.

5) Describe Linux boot-up sequence

BIOS reads the MBR where Boot Loader sits, Boot Loader reads Kernel into memory, Kernel starts Init process, Init reads inittab, executes rc.sysinit, the rc script than starts services to reach the default run level and once this is done the last thing that gets run is the rc.local script.

6) What is an INODE?

All files have its description stored in a structure called ‘inode’. The inode contains info about the file-size, access and modification time, permission and so on. In addition to descriptions about the file, the inode contains pointers to the data blocks of the file.

7) How do you search for a pattern and than replace it in an entire file?

Using Sed or in Vi editor the search usually involves character ‘s’ slash the pattern to be searched, slash the pattern to replace it with, slash ‘g’ which stands for entire file.

8) How do you list and flush all IPtables?

Using the iptables command with -L switch first to see all the rules currently present in memory and than -F to flush them.

9) How do you list compiled-in Apache modules?

Run the httpd daemon as a command with -l parameter.

10) What is a zombie?

Zombie processes can be identified in the output of ‘ps’ by the presence of ‘Z’ in the STAT column. Zombies are child processes whose parent process died

without reaping its children. Zombies can’t be killed with the usual KILL signal.

Linux Network Configuration And Troubleshooting Commands

There are a number of network strategy or media are anxious to form computer network. computer burdened with Linux operating system can as brilliant be a division of network whether it is modest or huge network by its multi tasking and multi user natures. Preserve of system and network up and operation is a task of system network Administrators job.

ifconfig : if con fig command is developed to initialize an interface, assign IP address to interface and facilitate disable interface on command. Among this command you can view IP address and hardware and MAC address allot to the interface and also MTU size. if con fig with edge command only shows correct interface facts like IP address, MAC address etc. With an options will exhibit all accessible interface details if it is disable also.

Assigning IP Address and Gateway: Assigning an IP address and gateway to interface on the fly. The place will be separate in case of a system reboot.
Enable or Disable Specific Interface: To facilitate or disable specific Interface.

We utilize case command as follows.

Enable eth0

Setting MTU Size: By defaulting MTU size is 1500. We can place required MTU size with under command.

Linux training to train someone to expand their Linux skill and obtain high quality job in the present market. IcanXplore present Linux course for developers, programmers, immigrant and Unemployed. Online Linux training build simple to obtain enhanced Linux ability.

Set Interface in immoral mode: Network interface only straight packet belongs to that exacting NIC. If you put frontier in corrupt mode it will establish all the packets. This is extremely functional to detain packet and examine later.

PING Command: PING command is the most favorable way to make sure connectivity between two nodes. It is local area network or extensive area network . Ping use ICMP Internet control communication protocol to chat to other devices. Ping host name of ip address using lower command.

ping 4.2.2.2

In Linux ping command preserve executing until you cut short. Ping with -c option exit after N number of demands. TRACER OUTE Command: Trace route is a network troubleshooting value which shows number of hops full to arrive at objective also determine packet traveling path. Under we are tracing method to global DNS server IP tackle and able to attain reason also show channel of that pack is traveling.

NET STAT Command: Net stat command exhibit relation info, routing table in order etc. Two displays routing table information use option as -r.

DIG Command : Dig query DNS related information like a record, CNAME, MX record etc. This command frequently uses to troubleshoot DNS related query.
NS LOOK UP Command : ns look up command also exploit to find out DNS related query. The following examples shows A record IP address of

tecmint.com.

nslookup www.tecmint.com

ROUTE Command : Route command as well explain and control IP steering table. Watch evasion routing table in Linux, method the following command
route

HOST Command : Host command to discover name to IP or IP to name in IPv4 or IPv6 and as fine query DNS events.

ARP Command: ARP is helpful to view add the inside of the kernels ARP tables. To see default table use the command as.

ETHTOOL Command: Eth tool is a stand-in of mii-tool. It is to thought setting the speed and duplex of your network interface card. Set duplex lastingly in /etc/sysconfig/network-scripts/ifcfg-eth0 with ETHTOOL_OPTS changeable.

IWCONFIG Command : IW con fig command in Linux is used to configure a wireless network interface. Recognize and set the basic Wi-Fi facts like SSID channel and encryption. Refer man page of iw con fig to classify additional.
HOST NAME Command : Host name is to know in a network. Execute host name command to observe the host name of your box. Set host name lastingly in /etc/sys config/network. Require to reboot box one time set a proper host name.

GUI tool system-con fig-network : Type system config net work in command prompt to configure net work setting and you will get nice graphical user interface (GUI) which can also utilize to configure IP address, gateway, DNS etc.

IcanXplore is from San Francisco bay area, in Silicon Valley, CA, USA, focused on providing Linux training around the world at own time, pace, 24/7. Only e-mail skill can renovate person into a successful Linux system administrator. Information technology professionals from Silicon Valley, CA, USA reveal effectual Linux training system to train person with basic knowledge of computer.

Linux Local Dns Cache Server

A Domain name system server is piece of software that runs on a pc, that can translate a website name into the true ip address. In different words if you kind an internet address into your web browser, your internet provider’s DNS server will look into it information and seek for the area name that your are requesting. The main purpose you would want a local dns cache server is to decrease the ping price whenever you request a selected web page. Another reason to have a local dns cache server is as a result of the dns records shall be tailor-made to your use.

Once you request a particular internet address or area in your internet browser, one of two issues will occur on the internet providers DNS server. The first thing that might occur if you request a website is that the tackle is already situated within the internet providers dns records.

The second factor that could occur when you request an internet deal with is that domain shouldn’t be positioned inside your internet providers records. If the domain that you are requesting is just not together with your web suppliers Domain name system server, then the handle will have to be found at a distinct dns server, then can be added to your web providers dns server records.

In case you are already utilizing a linux os akin to Ubuntu, simply open up your terminal program and sort in dig web-address.com. For instance I used Yahoo, so I typed in dig yahoo.com. As you possibly can see from the image under that my ping fee took 30 milliseconds for my request to achieve the dns server. For the experts on the market, you will also notice that I am already utilizing a local dns server.

Now upon getting run the dig command once, rerun similar command once more to see what you’ll get. As soon as I ran dig yahoo.com once more you’ll now discover that my ping fee to my dns server is just one millisecond. Now chances are you’ll think saving solely 29 milliseconds doing one search, but should you add this time up over many searches, it pays itself off. For those on the market that still use dial up or satellite internet will gain probably the most profit by having their own local Domain name system server. For example a satellite tv for pc internet supplier comparable to Wild Blue or Hughes Net might need anywhere from a 200 msec – 1500 msec ping time, so if you may lower this time down to a couple milliseconds would find yourself saving a number of time.

Now it’s time to get right down to the center of setting up your very own local dns server. In this tutorial I might be displaying you ways setup your local dns cache server on one computer, but you can set your dns server to manage your complete local network. This is able to permit each laptop on your network to speak to the local dns server, saving time for everybody on the local network. When you’ve got a number of computers on you network and wish to setup a local community dns server, observe the Ubuntu gateway firewall tutorial, then come back to this page to setup you local dns server. Just just remember to install dnsmasq as an alternative of bind9.

The primary that you’ll want to do in establishing your local dns cache server is to install the dns server software.

sudo apt-get install dnsmasq vim

Once dnsmasq is installed, you’ll now have to configure the dnsmasq to act as a cache server.

vi /etc/dnsmasq.conf

Inside the dnsmasq.conf file search for the line that says listen-address=127.0.0.1 and remove the to make this line active.

listen-address=127.0.0.1

The subsequent thing that you will need to do is edit the /and so forth/resolv.conf file to allow your local dns to have the ability to discuss to your internet suppliers dns server, just in case your local dns server would not contain the net addresses your are looking for. If you first setup your local dns cache server, there won’t be addresses in your dns server, so your dns server will want to be able to discover this handle somewhere.

You web providers dns handle may be discovered using many various strategies, so I’ll explain just a few of these ways. If you’re are using a router attempt typing one in every of these addresses to entry your default gateway. Open a web browser and sort in 192.168.1.1 or 192.168.1.254 in the handle bar. If you’re utilizing a 2wire gateway the address will likely be 192.168.1.254, and in case you are using another router akin to a Linksys router, the address will probably be 192.168.1.1.

If you are on a Home windows based pc, simply open up the command prompt by going to Begin –> Accesories –> Command Prompt, or search for “cmd”. After getting the command immediate open, sort in ipconfig /all. After getting typed the ipconfig /all command simply look although the list for Domain name system servers. When you nonetheless don’t know what the hell I am talking about you can too use the handle of your default gateway or the dns addresses provided by OpenDNS.com. 208.67.222.222 and 208.67.220.220.

Now it is time to edit the /etc/resolv.conf file.

vi /etc/resolv.conf

Make sure you add 127.0.0.1 to the file, since it will tell the resolv.conf file to take a look at you local host first for the dns translation. As you’ll be able to see from my resolv.conf file that I’ve added 127.0.0.1, 10.0.0.1 and 192.168.1.254. Since I am operating a local dns server on my entire community, I have additionally added the handle of my dns server. In all actuality 127.0.0.1 and 10.0.0.1 addresses are referring to the same computer.

domain gateway.2wire.net
search gateway.2wire.net
nameserver 127.0.0.1