Linux Admin Interview Preparation with a Checked Exercise
Prepare for a Linux administrator interview by rehearsing short answers, testing one bounded example and explaining the limits of its result. Start with the job’s actual responsibilities, then practise a definition, a demonstration and a follow-up question for each relevant topic. This guide uses a checked hard-link exercise in a new temporary directory.
Topic: Linux Administration in IT Infrastructure · Interview preparation
Quick answer: Prepare for a Linux administrator interview by rehearsing short answers, testing one bounded example and explaining the limits of its result. Start with the job’s actual responsibilities, then practise a definition, a demonstration and a follow-up question for each relevant topic. This guide uses a checked hard-link exercise in a new temporary directory. It gives you something specific to explain without changing services, users, disks or network settings.
Key takeaways
- Choose practice topics from the role’s responsibilities and named platform.
- Predict output before running a small exercise.
- Explain what the result establishes and what it leaves untested.
- Rehearse follow-up questions that change one assumption.
- Label lab work accurately when discussing experience.
Table of Contents
- Which questions should you rehearse first?
- How would you answer the hard-link question in one minute?
- What should you predict before the exercise?
- How can you demonstrate the idea without touching existing files?
- Which follow-up questions make the rehearsal worthwhile?
- How do you extend this method to services and scheduled work?
- How should you review a mock interview?
- References
Which questions should you rehearse first?
Turn the job description into a short set of tasks. If the role handles scheduled batch services, practise service states, failed-run evidence and retention decisions before studying an unrelated cluster product. Ask the recruiter which distribution and interview format are relevant when those details are missing.
The NICE Framework overview describes work through tasks, knowledge and skills. You can use that distinction to organise your own preparation: name a task, explain the knowledge behind it and identify an exercise that demonstrates part of the skill. It does not prescribe a Linux interview question list.
For example, a candidate called Meera picks file identity as one rehearsal topic. Her practice question is: “If two names refer to the same file, do I have two independent copies?” She writes her answer before checking it.
How would you answer the hard-link question in one minute?
A hard link is another directory entry for the same underlying file. Within one filesystem, the names share the file’s inode. A symbolic link instead contains a pathname reference, which can cross filesystem boundaries and can refer to a missing target. The GNU ln manual explains these distinctions.
Meera’s opening answer is: “Two hard-link names do not provide an independent backup of the content. I would check the filesystem context and file identity before treating two paths as separate copies.” She then waits for the follow-up instead of reciting every option of the link command.
A useful follow-up asks whether matching inode numbers on unrelated filesystems prove identity. They do not: inode numbers are interpreted with their filesystem or device context. Our exercise keeps both names in the same newly created directory.
What should you predict before the exercise?
Predict that both names will have the same inode in this directory and that each status report will show a link count of two. The GNU stat manual documents the inode and hard-link-count fields used by the format options. A matching content hash alone would answer a different question: separate files can contain identical bytes.
Record the command implementation as well as the shell. BusyBox’s manual explains that its utilities are compact implementations and that included features depend on the build. This exact exercise was checked using an existing Linux BusyBox /bin/sh environment. That check does not establish behaviour for every filesystem or a full GNU installation.
| Prediction | Expected observation | Meaning |
|---|---|---|
| File identity | Same inode here | Both names refer to the same file |
| Link count | Two for each name | Two hard-link directory entries exist |
| Backup independence | Not demonstrated | No separate content copy was created |
How can you demonstrate the idea without touching existing files?
The script creates a unique directory beneath /tmp and writes one invented note there. It makes a second hard-link name, reads status fields and retains the tiny fixture. Setup and status-read failures stop the script before it reports later results. The GNU mktemp manual explains why creating the directory is preferable to merely predicting an unused name.
The displayed source is the exact checked script. Its changing temporary directory name is intentionally absent from the deterministic output. No existing files are read or removed.
#!/bin/sh
practice_dir=$(mktemp -d /tmp/webasha-440.XXXXXX) || exit 1
printf '%s\n' 'Invented interview practice note' > "$practice_dir/source.txt" || exit 1
ln "$practice_dir/source.txt" "$practice_dir/alias.txt" || exit 1
source_inode=$(stat -c '%i' "$practice_dir/source.txt") || exit 1
alias_inode=$(stat -c '%i' "$practice_dir/alias.txt") || exit 1
if [ "$source_inode" = "$alias_inode" ]; then
printf '%s\n' 'Same inode in this directory: yes'
else
printf '%s\n' 'Same inode in this directory: no'
exit 1
fi
source_links=$(stat -c '%h' "$practice_dir/source.txt") || exit 1
alias_links=$(stat -c '%h' "$practice_dir/alias.txt") || exit 1
printf 'Source link count: %s\n' "$source_links"
printf 'Alias link count: %s\n' "$alias_links"
printf '%s\n' 'Tiny training fixture retained.'
Checked output:
Same inode in this directory: yes Source link count: 2 Alias link count: 2 Tiny training fixture retained.
Which follow-up questions make the rehearsal worthwhile?
Ask whether changing the content through one name would affect what is seen through the other. Because both names refer to the same file, an in-place content change would be shared. An application that replaces a pathname with a new file can behave differently, so describe the operation before predicting the outcome. We do not perform either change here.
Then change the premise: what if the second item is a symbolic link, or lies on another filesystem? Explain which part of the earlier answer no longer applies. The objective is to practise reasoning through changed conditions, not to memorise the printed numbers.
Meera’s reviewer asks her why two matching hashes would be insufficient. She corrects her earlier worksheet to separate content equality, file identity and backup independence. That correction becomes the next rehearsal target.
How do you extend this method to services and scheduled work?
Use a question that forces you to distinguish two related ideas. For services, ask: “Does enabled mean running?” The systemctl manual distinguishes unit-file enablement from runtime activity. Your answer should name the state being asked about and avoid treating an enablement report as a health check.
For a scheduled task, ask: “Does a timer prove the application completed successfully?” The systemd timer manual describes timer activation of a unit; completion evidence belongs to the triggered work. No service or timer is changed in this rehearsal.
| Rehearsal question | Answer cue | Useful follow-up |
|---|---|---|
| Is the service enabled? | Discuss activation configuration | What proves it is healthy now? |
| Did the timer fire? | Separate activation from completion | Where is the job result recorded? |
| Are these independent backups? | Check copy and recovery properties | Have you tested a restore? |
How should you review a mock interview?
Use a partner to ask the original question and one changed-condition follow-up. Allow a short opening answer, then record the exact point at which you became uncertain. A list such as “revise Linux” is too broad; “explain inode scope before comparing numbers” gives the next session a clear purpose.
Keep a compact practice note containing the question, prediction, actual result, correction and source. If an exercise used BusyBox, say so. If you only read the service documentation, do not describe that as operating a production service.
Before the interview, prepare your own questions about access boundaries, change review and supervision. The answers help you judge whether the advertised responsibilities match the work you are ready to perform. Rehearsal improves your explanation; it cannot guarantee a particular question or hiring outcome.
Related reading: Everyday Linux operator interview questions; Linux behavioural interview answers.
References
Frequently Asked Questions
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Wow
0
Sad
0
Angry
0