All jobs / DevOps / SRE / cloud / Linux
DevOps / SRE / cloud interview question · 1–3 years
A runbook installs a CLI on every server with `curl https://… | sudo bash`. What do you prefer, and why?
The strongest answer
A package from a trusted repository, or a pinned release whose checksum or signature we verify, baked into the image — reviewable, reproducible and upgradable
Why it works
Right — package management gives you versions, verification and an upgrade path; a pipe to root gives you whatever the server sent today.
What a good answer covers
- Install from a repo or a verified pin.
- Pin the version.
- Verify checksum or signature.
- Bake it into the image.
Answers that fall short
- Close, but not the strongest: Download the script first, read it, then run it — at least we see what it does
Better, but you still have no pinned version and the next run may fetch a different script. - Weak: It is fine as long as the URL is HTTPS; the transport is encrypted
HTTPS proves who you talked to, not that the content matches what you reviewed or the version you tested. - Red flag: Keep it; if the vendor is compromised we have bigger problems anyway
Running unpinned remote code as root on every server is exactly the supply-chain hole an interviewer is probing for.
Who gets asked this
More Linux questions
- A deploy script failed on step two (the build), carried on, and pushed an empty artifact to production. What…
- `df -h` says the root volume is 100% full. `du -sh /` adds up to less than half of that. What is going on…
- Load average is 40 on an eight-core VM, yet `top` shows CPU mostly idle and the app is crawling. What does…
- `./deploy.sh` says “Permission denied” and `ls -l` shows `-rw-r--r--`. What do you do?
- What do you check, and what was the likely mistake?
- Everyone SSHes as root with the same key. What do you change first?
- A service fails to start with “address already in use” on port 8080. How do you find out what holds it?