Linux Interview Questions
26 Linux questions from real DevOps and SRE interviews, sorted by seniority: permissions, processes and signals, systemd, networking utilities, disk space, and performance triage.
Explain what <code class="rounded-none bg-slate-100 px-1 py-0.5 font-mono text-[0.9em] text-slate-900">chmod 644</code> and <code class="rounded-none bg-slate-100 px-1 py-0.5 font-mono text-[0.9em] text-slate-900">chmod 755</code> actually mean.
Each digit is a three-bit field for one class of user: owner, group, other. Read is 4, write is 2, execute is 1.
644 is owner read and write, group read, other read. That is the normal mode for a file.
755 is owner read, write and execute, group read and execute, other read and execute. That is the normal mode for a directory or a script.
The part that shows understanding: on a directory, the bits mean something different. Read lets you list names, write lets you create and delete entries, and execute lets you traverse into it. A directory with read but not execute gives you the file names and nothing else, which is why 755 rather than 644 on directories is not arbitrary.