Engineering Interview Questions

From Tayledras
Jump to: navigation, search

<span style="color:blue; font-size:8pt; font-face:verdana,sans-serif; border:0.2em outset #ceebf7; padding:0.1em; font-weight:bolder; -moz-border-radius:8px; "> Back to the Top

Overview (Purpose)

Having a single, indexed, "go-to" page of Interview Questions is very useful. As we ask questions of others (or get asked questions ourselves), having a central repository of Interview Questions to guage a candidate's skills and depths is useful.

  • It's not expected that any one person would know everything, but this is a list mean to assess the width and depth of a candidate's skillset.

Please feel free to add to or edit this page!

Linux Administration Interview Questions

Simple Linux Questions:

  • What is the name and the UID of the administrator user?(root, 0)
  • How to list all files, including hidden one, in a directory?(ls -a)
  • What is the Unix/Linux command to remove a directory and its contents?(rm -rf [target])
  • Which command will show you free/used memory? Does free memory exist on Linux?(free -m, traditionally memory shared by OS for disk caching but available)
  • How to connect to a remote server or what is SSH?(secure shell, encrypted remote access over TCP/22)
  • I get "command not found" forifconfig -a. What can be wrong?(net-tools package not installed)
  • What is the role of /etc/resolv.conf file?(plain-text file acts as resolver, querying targets in order listed)
  • What command will show the available disk space on the Unix/Linux system?(df -h)
  • What Unix/Linux commands will alter a files ownership, files permissions?(chown, chgrp, chmod)
  • What doeschmod +x FILENAMEdo?(allows execution of filename as script or binary)
  • What does the permission 0750 on a file mean?(owner can read/write/execute, group can read, others can no nothing)
  • What does the permission 0750 on a directory mean?(root, 0)
  • How to redirect STDOUT and STDERR in bash?(> /dev/null 2>&1)
  • What is the difference between UNIX and Linux?(Unix is a proprietary software operating system. Linux is an open source operating system based on Unix. Linux is basically the name of the Kernel and was developed in 1991. The Linux kernel is developed by the community and Linus Torvalds oversees things.)
  • What is the difference between Telnet and SSH?(simply: Telnet is unencrypted plain-text on TCP/23, SSH is encrypted text on TCP/22)
  • Explain the three load averages and what do they indicate?(three averages, for 1, 5, and 15 minutes, based on CPU count. If they are higher than your CPU count, you have a problem.)

Medium Linux Questions:

  • What is a packet filter and how does it work?
  • What is swap and what is it used for?
  • What is an A record, an NS record, a PTR record, a CNAME record, an MX record?(Address Mapping records (A), IP Version 6 Address records (AAAA), Canonical Name records (CNAME), Host Information records (HINFO), Integrated Services Digital Network records (ISDN), Mail exchanger record (MX), Name Server records (NS), Reverse-lookup Pointer records (PTR))
  • Are there any other RRs and what are they used for?
  • What is the sticky bit?(permission bit that is set on a file or a directory that lets only the owner of the file/directory or the root user to delete or rename the file. No other user is given privileges to delete the file created by some other user.)
  • What is an inode and what fields are stored in an inode?(The inode is a data structure in a Unix-style file system that describes a filesystem object such as a file or a directory. Each inode stores the attributes and disk block location(s) of the object's data.[1] Filesystem object attributes may include metadata (times of last change,[2] access, modification), as well as owner and permission data.)
  • What is a runlevel and how to get the current runlevel?(0 - halt, 1 - single user, 2 - multiuser without network, 3 - multi-user with networking, 4 - undefined, 5 - X11 [3+GUI], 6 - reboot) (who -r, runlevel)
  • What is SSH port forwarding?
  • Describe a scenario when you get a "filesystem is full" error, but 'df' shows there is free space.
  • Describe a scenario when deleting a file, but 'df' not showing the space being freed.
  • What happens to a child process that dies and has no parent process to wait for it and what’s bad about this?
  • How to know which process listens on a specific port?
  • What is Iptables?
  • Which privilege is required to operate iptables?
  • How can you find all the regular files in a directory?
  • What is LVM?
  • Which command is used to extend a logical volume?
  • Which necessary partition cannot be a part of logical volume group? boot partition cannot be a part of logical volume group. You must have create it as a regular partition.
  • Tell me the steps to remove the swap file?
  • What daemon is responsible for tracking events on your system?
  • walk me though a kickstart install. Install one machine as you like it, save /root/anaconda-ks.cfg to a webserver. Setup a PXE (DHCP, TFTP, HTTP, DNS) environment and use that kickstart file to install the rest.

Hard Linux Questions:

  • What shortcuts do you use on a regular basis?
  • What kind of keys are in ~/.ssh/authorized_keys and what it is this file used for?
  • I've added my public ssh key into authorized_keys but I'm still getting a password prompt, what can be wrong?
  • Did you ever create RPM's, DEB's or solaris pkg's?
  • Describe the linux boot process with as much detail as possible, starting from when the system is powered on and ending when you get a prompt. Boot process follows 6 major steps. Starting with BIOS > MBR > GRUB > KERNEL > INIT > RUN LEVELS
  • When trying to umount a directory it says it's busy, how to find out which PID holds the directory?
  • How do you debug a running process or a library that is being called? A: strace -p PID
  • What are the steps to create LVM logical volume?

Java Administration

  • What is theJVM?
  • Describegarbage collection.
  • What are the types of garbage collectors?
  • Walk me through a garbage collection, what happens?
  • What are the heap generations?
  • Describe the young heap spaces.
  • What is stored in the To space of a young generation
  • How do you set the heap size?

Apache

  • What is the basic directory structure?
  • What files are contained in/etc/httpd/conf.d?
  • What is avirtual host?
  • What are the types of virtual hosts?
  • What is meaning of "Listen" in httpd.conf file?
  • What isDocumentRoot?
  • Can I serve content out of a directory other than the DocumentRoot directory?
  • Which tool you have used for Apache benchmarking?
  • You are getting following codes (2xx, 3xx, 4xx, 5xx) in Apache, at some point of time. What does this means?
  • Can we have two Apache Web servers on a single machine?
  • Which of the following best explains why Apache Web servers are able to handles multiple requests? A. Apache is able to spawn child processes that handle requests before they die.
  • What does bstands for?

Redhat

  • What isRPM?
  • What isYUM?
  • Explain the differences.
  • What does/bootdirectory contains?
  • What does/devdirectory contain?
  • If you are getting error"package is already installed"but you have to install package anyhow. what option you will use?
  • How do you install Linux software’s by RPM?
  • How many Run Levels are present in Linux, and what does each do?
    • 0: Halt the system
    • 1: Single-user mode
    • 2: Not used
    • 3: Multi-user mode with text login
    • 4: Not used
    • 5: Multi-user mode with graphical login
    • 6: Reboot
  • What is thedefault runlevelfor a server?
  • Explain/procfilesystem?

Puppet

  • What is Puppet?
    • In computing, Puppet is an open-source software configuration management tool. It runs on many Unix-like systems as well as on Microsoft Windows, and includes its own declarative language to describe system configuration.
  • What isModuleand how it is different fromManifest?
    • Puppet uses its own domain-specific language (DSL) to describe machine configurations. Code in this language is saved in files called manifests. A manifest is a file containing Puppet DSL code. A module is a structure used for creating portable code. While modules usually contain manifests, they also typically contain files, templates, metadata, and test cases. You can absolutely create a module that does not contain a manifest.
  • What isFacter?
    • Facter provides information like Kernel version, Dist release, IP Address, CPU info and etc.
  • Define what scope is and how it effects
    • Top scope - Code that is outside any class definition, type definition, or node definition exists at top scope.
    • Node scope - Code inside a node definition exists at node scope.
    • Local scope - Code inside a class definition or defined type exists in a local scope.
  • Explain Named Scopes and Anonymous Scopes
  • What is the difference betweenstatic scopeanddynamic scope?
    • In dynamic scope, parent scopes are assigned by both inheritance and declaration, with preference being given to inheritance.
    • In static scope, parent scopes are only assigned by class inheritance (using the inherits keyword).
  • Variables provided by an ENC are set at top scope.
  • What Is anENC?
    • An external node classifier is an arbitrary script or application which can tell Puppet which classes a node should have.
  • What isHiera?
    • Hiera is a key/value lookup tool for configuration data, built to make Puppet better and let you set node-specific data without repeating yourself.
  • Describe the Hiera lookup types.
    • Priority (default) - A priority lookup gets a value from the most specific matching level of the hierarchy.
    • Array Merge - An array merge lookup assembles a value from every matching level of the hierarchy. Hash Merge - A hash merge lookup assembles a value from every matching level of the hierarchy.
  • what is meant by Deep Merging?
    • In Hiera 1.2.0 and later, you can also configure hash merge lookups to recursively merge hash keys. SeeDeep Merging in Hiera ≥ 1.2.0
  • DescribeHiera Lookup Functions
  • How would you troubleshoot a puppet manifest?
  • Describe inheritance.
    • Inheritance causes three things to happen:
      • When a derived class is declared, its base class is automatically declared first (if it wasn’t already declared elsewhere). The base class becomes the parent scope of the derived class, so that the new class receives a copy of all of the base class’s variables and resource defaults. Code in the derived class is given special permission to override any resource attributes that were set in the base class.
    • scope lookup rules
      • static scope and dynamic scope.

Shell

  • What does . mean in regular expressions?
  • What is difference between ” and ‘?
  • What does $? give you?
    • Expands to the exit status of the most recently executed foreground pipeline.
  • You might have heard about inodes. can you describe inode briefly?
    • A ‘inode’ is a ‘data-structure’, which is used for file identification on Linux. Each file on an Unix System has a separate ‘inode’ and an ‘Unique’ inode Number.
  • What is the difference between $$ and $!?
    • $$ Expands to the process ID of the shell.
    • $! Expands to the process ID of the most recently executed background (asynchronous) command.

Perl

  • ForandForeach
    • Theforstatement has an initialization, condition check and increment expressions in its body and is used for general iterations performing operation
  • Describe ascalar variable, array variable, associative array
  • What is aperl 1-liner?
  • How do I read command-line arguments with Perl?
  • Write a program to concatenate the$firststringand$secondstringand result of these strings should be separated by a single space.
  • What does the argument-w, -ddo?
  • Difference betweenmyandlocal
  • Write syntax to add two arrays together in perl?
    • @arrayvar = (@array1,@array2);

DNS

  • Which are the important configuration files for DNS server?
  • On which port DNS server works?
  • Does DNS use TCP or UDP?
    • A: Both
  • You have made updates to a zone file, however those updates are not reflected in nslookup or dig. What steps do you take to ensure your changes are applied and propagated?
    • A: Ensure the Serial number is updated and a higher number than previous, rndc freeze/thaw the zones
  • What is a zone serial number? How is it used by DNS?
  • You have updated your named.conf or zone file with a slightly new configuration, how can you verify that it will function without restarting or reloading named?
    • A: named-checkzone or named-checkconf
  • What is the purpose of a MX record? An SPF record?

Other Great References:

Some questions are 'borrowed' from other great references like: