Skip to content

Comment on Linux Sysadmin/DevOps Interview Questions

Comments

Any additional questions anyone can think of?

One ultimate question: "describe a project of yours, current or past, personal or or job-related, that you are most proud of". You don't need to ask a professional anything else if he's anywhere near worth his salt; he'll volunteer all the information you could judge him by.

Having that said, most of the questions from "general questions" part come either from assuming that the candidate is dumb and possibly doesn't understand how computers work or from some lousy layman psychology.

Many of the questions further down are incorrectly assigned. "What is an A record?" is not a Linux-related question, and git is hardly a "devops tool".

Very poor list, in my opinion. In an interview you need to assess whether the candidate can do the job. Since the only heuristics available to the interviewer is how the candidate did in the past, the interviewer needs to allow candidate to show what he has done, how, and why.

And just for fun:

A careless sysadmin executes the following command: chmod 444 /bin/chmod - what do you do to fix this?

My favourite way of fixing it is by running /bin/chmod. It blows minds of most smart-asses who ask this question.

> A careless sysadmin executes the following command: chmod 444 /bin/chmod - what do you do to fix this?
My favourite way of fixing it is by running /bin/chmod. It blows minds of most smart-asses who ask this question.

----

Not sure what I'm missing here?

    $ docker run -it ubuntu
    # chmod 444 /bin/chmod
    # /bin/chmod
    bash: /bin/chmod: Permission denied

ELF interpreter/loader.

  objdump -s -j .interp /bin/chmod
  /lib64/ld-linux-x86-64.so.2 /bin/chmod

So... when the first third of the questions in the 'general questions' section is asking about what the applicant has done, how, and why, it's "lousy layman psychology", but when you ask for the same thing, it's "the only way to do it"?

Most distros symlink /bin to /usr/bin. I think the question is asking you to use /lib/ld.so, but it's a bit of a weird question to ask.

Most distros symlink /bin to /usr/bin.

Uhm, no? I've only seen it in recent CentOS (older versions didn't have it), and maybe Fedora does this as well.

I think the question is asking you to use /lib/ld.so, but it's a bit of a weird question to ask.

Not really. You can do it in any number of ways, including using Perl/Python/Ruby, writing a short C program, or overwriting another file with execution permissions. My favourite way is a surprise to most people only because they don't know how ELF binaries work.

Most distros symlink /bin to /usr/bin. > > Uhm, no? I've only seen it in recent CentOS (older versions didn't have it), and maybe Fedora does this as well.

Arch, Ubuntu, Debian all do it.

Not really. You can do it in any number of ways, including using Perl/Python/Ruby, writing a short C program, or overwriting another file with execution permissions.

Only the last one is a clever solution. "Just write a program" isn't a fun answer. :P

My favourite way is a surprise to most people only because they don't know how ELF binaries work.

What do you mean? They didn't know there's a copy of the same binary?

>> Most distros symlink /bin to /usr/bin.
> Uhm, no? I've only seen it in recent CentOS (older versions didn't have it), and maybe Fedora does this as well.
Arch, Ubuntu, Debian all do it.

I haven't checked Arch, but neither Ubuntu 16.04 nor Debian Jessie haven't created /bin as a symlink.

> You can do it [restoring execution bit on /bin/chmod] in any number of ways [...]
Only the last one is a clever solution

On interview you don't need to have the most clever answer. It's better to show you understand the mechanisms underneath by having several sensible ways.

What do you mean? They didn't know there's a copy of the same binary?

No, I meant this: https://news.ycombinator.com/item?id=11627670

And there is no copy of the same binary.

I haven't checked Arch, but neither Ubuntu 16.04 nor Debian Jessie haven't created /bin as a symlink.

Odd, I could've sworn they did. I stand corrected.

> What do you mean? They didn't know there's a copy of the same binary?
No, I meant this: https://news.ycombinator.com/item?id=11627670
And there is no copy of the same binary.

That's what I said, you use the ELF interpreter. :P

Ask about 'ip' and why they might want to use it. Distros themselves don't use ifconfig any more and ifconfig can choke on more complex (virtual IPs, on vlans, bonded) setups.

How to get the serial number of a VM or physical box (dmidecode for Intel, bonus points for /proc for powerpc)

I only see one reference to /proc in here, which is kinda lame. As a sysadmin who's frustrated with some inflexibilties of lots of commands to the point of iterating through it fairly regularly (and know others like that, too), it'd be a great/necessary add.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.