Linux Administrator Interview

So you applied for that Linux Administration interview, eh? Think your goin' to get it, eh? Well take a stab at the following questions and test your ability. I've been run through the wringer with a multitude of interviews at some of the top Silicon Fally companies. Below are some of the questions I've been asked and questions I feel every Linux System Admin should know. Good Luck! (P.S. There are no answers here. :P)

Linux Admin Interview Questions:

Level 1:
  • How do you quickly view the space left on the all mounted drives? In human readable format?

  • You are adding a brand new hard drive to the second SATA port of a server. Explain how you go about this.

  • You have console on a linux box. After running ‘ifconfig’ you only see the loop back network interface. What do you do to get this machine back online. Physical box in datacenter with cable plugged in.

  • You’re trying to run some application, but it keeps failing to start due to an inability to open the necessary port it wants to listen on. You run netstat -an | grep LISTEN | grep , but don’t see anything listening on that port. What could be going on here?

  • You backup your logs and use logrotate to compress and archive all old logs. You need to examine a log, two months old. What would you suggest without decompressing the compressed file?

  • Explain POSIX permissions to someone who doesn’t know Linux.

  • How do you see the permissions on a file or directory?
    How would you set the permissions on the file secure.txt so that the owner can read and write but the group and others can’t read, write or execute?

  • What do the permissions 755 mean?

  • What is RAID/how does RAID work on a basic level?

  • Briefly explain RAID0/1/5/6/10, how much space is usable compared to total, reliability, performance.

  • What happens when you telnet to on port 80?

  • How does a URL translate to an IP?

  • Ports that are used for: DNS, SSH, HTTP, HTTPS, Telnet, BGP, LDAP, LDAPS, IRC/IRCS

  • What is an ephemeral port? What are they used for?

  • Describe the Linux run levels. How would you change the default run level?

  • Describe a subnet, what’s it’s purpose?

  • What tool(s) would you use to view what ports are open on a remote host?

  • Describe the idea behind a config management system.

Level 2:
  • What does kill do?

  • What is a sticky bit? How would you set it?

  • What is the TCP handshake?

  • How could you determine what IP addresses are currently used on your subnet?

  • What are the different Linux boot levels?

  • How would you remove all "*.pyc" files from a directory, recursively?

  • You're cleaning up your computer and have a junk drop folder…full of tons of various files. How would you grab only the files modified within the last 15 days?

  • Describe (don't need exact commands/lines) how you'd configure a white-list iptables setup in front of an FTP server. Hint: there are two answers.

  • What ISO network layer does ICMP run on?

  • How do you change how often a file system check is run at boot time?

  • What are the steps to add a user to a system without using useradd/adduser?

  • How would you send a test email via command line?

  • What 'masquerade' means in context of iptables

  • What would the output of the following look like?
    "date; ps aux | awk '{print $1}' | sort | uniq | wc -l" >> output.log

  • So after fixing an out of control application earlier in the day, you notice that your server’s partition is filling up. After poking around you see that the angry application from earlier has naturally flooded its log for today with error messages, which has almost filled the partition. Hurray, more cleanup! You check your log aggregation system (Splunk/Logstash/whatever) and confirm that all logs are up to date, so you wipe out today’s log with an rm. You come back 10 minutes later and notice that, while the log file is gone, disk space hasn’t recovered! What’s going on here?

Level 3:
  • What is PID 0?

  • Draw a picture of a network infrastructure that could support _____.

  • On a RHEL/Centos 6.5 box, how would you configure rsyncd to run as a service and listen on a specific port of your choosing?

  • Give an example of a device that operates primarily at each of the first three layers of the OSI networking model.

  • How do you prevent your organization’s users from bypassing your organization’s DNS servers? (I.e. You want to force your users to only use the company DNS servers.)