Linux Sysadmin/DevOps Interview Questions
Thanks for the effort.<p>These type of questions are OK for a filter phone interview or entry-level Linux job imho as in they rely on &quot;what is&quot; questions (which can be memorized or replied without much experience) rather than &quot;how would you&quot; questions (the &quot;demo time&quot; at the end, that&#x27;s the good part). You want to ask scenario and troubleshooting questions rather than trivia for jobs other than basic ones. (You can certainly ask more advanced non-scenario -still relatable or practical- questions about things like system calls, interrupts, CPU scheduling etc, &quot;system internals&quot; stuff that I don&#x27;t see at all or barely in these questions. A Linux questionnaire without mentioning strace or perf hurts my heart.)<p>I can basically nit-pick, find a fault or find a better way of asking in pretty much every question.<p>The Expert section can be dropped (only one question).<p>Mysql section can be dropped, maybe replace with basic SQL section.<p>DevOps section can be dropped, we can see here how definition of DevOps is still fluid, just add Linux&#x2F;Networking&#x2F;General questions to their respective sections (also &quot;GIT&quot;, really?).<p>One reference link at the bottom doesn&#x27;t work.<p>----<p>Examples of issues with questions and how to improve them:<p>- What commands do you know that can be used to check DNS records?: instead ask how to troubleshoot DNS issues, like how to check if a name server has an entry. How does local DNS work? (as in what&#x27;s the order in which files&#x2F;servers are checked to resolve a name, where is that stored) how does DNS in general works? (as in you ask for a record to a name server and it doesn&#x27;t have it, now what). How much TTL would you set in a record and why. Why does DNS run on UDP and TCP?<p>- &quot;tac&quot;, (really? and no &quot;grep&quot; &quot;sort&quot;, &quot;uniq&quot; or &quot;sum&quot;?), rather ask how to print a field from a command like &#x27;df&#x27; or &#x27;free&#x27; or how to add column values from a text file (basically if they can slice horizontally with grep and vertically with awk &#x2F; cut and then count occurrences or sum numbers.<p>-  What does &amp; disown after a command do?: rather ask when you would use &#x27;disown&#x27;, or better, inversely how to de-attach a running command from terminal<p>- What is Virtual Memory? : not sure what you want them to answer here, maybe rather ask about a server with most of its total memory used, what does Linux cache (there&#x27;s buffer and inode&#x2F;dir caching besides files but only two memory caching areas), how to find that, when does the OS write stuff in RAM to disk (what are dirty pages), how do you change that frequency, when is better to do it more&#x2F;less frequently or what&#x27;s the tradeoff etc<p>- What is swap and what is it used for?: this is more advanced but you can ask if a server can have no swap, is it possible for a server with plenty of free RAM to page (write to swap)? can you reduce&#x2F;increment tendency to swap? why would you do that, how much swap partition would you set up (OK these are a bit of tricky questions, more to gauge experience)<p>- How to search for the string &quot;my konfi is the best&quot; in files of a directory recursively? : I actually like this one<p>- How to connect to a remote server or what is SSH? : you can split in &quot;list all the possible ways you can think of so you can communicate (or send message&#x2F;file) between two servers on a network&quot; and a question about how SSH works from Linux point of view (not protocol), sshd settings (idea, not memorized params), how to set up passwordless (key-based) SSH, hardening tips, how to troubleshoot if you can&#x27;t ssh to a server (no firewall, you can telnet&#x2F;whatever), what does it mean when you get a message &quot;key has changed etc&quot;, what&#x27;s a private and public key...<p>- What is the sticky bit? : this depends on OS, I guess explaining different behaviours is good.<p>- What does the immutable bit do to a file?: this is not part of linux VFS but of particular filesystem implementations, btw no questions about what&#x27;s a filesystem, what&#x27;s a journaled one, difference between ext4 and xfs for ex. Also what about LVM?<p>- What is the difference between hardlinks and symlinks?: while a good question I&#x27;d rather ask when to use one or the other, also just to confuse, ask how to &quot;link&#x2F;map&quot; a directory in a partition that is running out of space to a directory in a new partition with plenty of space, so that it works transparently.<p>- What is MAJOR and MINOR numbers of special files?: I guess device files, rather or besides ask difference between block and character devices, about pseudo dirs in file system: &#x2F;dev &#x2F;proc &#x2F;sys , how to find hardware or process info (everything is pretty much in &#x2F;proc or &#x2F;sys , also dmesg )<p>- Describe a scenario when deleting a file, but &#x27;df&#x27; not showing the space being freed. : this is good but it can be better built into a scenario: there&#x27;s an &quot;no space left on device&quot; error, how to find biggest files&#x2F;dirs. You find it&#x27;s a huge web server access.log file, now you delete it and disk space doesn&#x27;t seem to shrink, why (the df vs du), what can you do?, can you close the open file?<p>- Instead of &quot;how does ps&#x2F;top work?&quot; ask something specific or scenario based, like how do you find if there&#x27;s a disk I&#x2F;O problem by looking at &#x27;top&#x27; (there&#x27;s at least two possible indicators). Zero questions about I&#x2F;O, or for the matter, for server utilization metrics, which ones are they, how to measure each, how to find if they reached saturation, what happens in that case for each, how to look for errors in each. If a server is using 80% CPU is that good or bad?<p>OK I got tired here.<p>If you have read until this dear reader, would you be interested in my trying to create a Docker container or Amazon image with a Linux box and have these types of scenarios set up?