Site Reliability Engineer
Linux and shell questions
193 questions on Linux and shell for site reliability engineers, easiest first.
Easy 60
- Linux load averageeasy
- The USE methodeasy
- Reading logs of a systemd serviceeasy
- Who is using port 8080?easy
- A process vanished overnighteasy
- Safer Bash scriptseasy
- Hard link after deleting the originaleasy
- The t at the end of /tmpeasy
- Mode of a new file with umask 022easy
- Hiding error messages of a commandeasy
- Process state Z in pseasy
- Signal sent by plain killeasy
- Signals a program cannot catcheasy
- Where password hashes are kepteasy
- Safe way to edit sudoerseasy
- Keeping a job running after logouteasy
- Files changed in the last 24 hourseasy
- Meaning of exit status 0easy
- What /proc containseasy
- Creating a .tar.gz archiveeasy
- Searching every file in a foldereasy
- Which column of free to trusteasy
- The wa figure in topeasy
- How many CPUs this box haseasy
- Where kernel messages appeareasy
- What swap is used foreasy
- Top memory users with pseasy
- Per-disk busy time and latencyeasy
- Seeing the hops to a servereasy
- Finding what fills /vareasy
- Following a log that gets rotatedeasy
- Reading a kernel settingeasy
- Which kernel is runningeasy
- A server with almost no free RAMeasy
- Re-running a command every few secondseasy
- The real line from timeeasy
- Enable versus starteasy
- After editing a unit fileeasy
- Listing units that failedeasy
- Logs from before the crash rebooteasy
- Package tool on RHEL and Ubuntueasy
- Seeing the server's IP addresseseasy
- Pointing a name at a test servereasy
- Setting up key login to a servereasy
- Copying a file to another servereasy
- What logrotate doeseasy
- Renaming a server for goodeasy
- Is the clock being syncedeasy
- Opening HTTPS in ufweasy
- Seeing a newly attached diskeasy
- Checking only the response headerseasy
- File names with spaces in a scripteasy
- Single quotes and variableseasy
- Counting script argumentseasy
- Putting today's date in a file nameeasy
- Running a step only if the last workedeasy
- Counting error lines in a logeasy
- Running a new scripteasy
- Variable missing in a child programeasy
- Checking that a file existseasy
Medium 76
- No space left, but disk is not fullmedium
- Deleted the log, space not freedmedium
- Reading vmstat outputmedium
- Cannot assign requested addressmedium
- How passwd edits a root-owned filemedium
- Shared folder that keeps its groupmedium
- Symbolic chmod as a numbermedium
- Execute permission on a directorymedium
- Deleting a read-only filemedium
- What an inode does not holdmedium
- Getting rid of zombie processesmedium
- Child whose parent has exitedmedium
- How the shell starts a programmedium
- Nice values for a batch jobmedium
- Too many open files errormedium
- Seeing what a process has openmedium
- SSH refuses a private keymedium
- Script works by hand, fails in cronmedium
- Reading a crontab linemedium
- Permission denied on an executablemedium
- Boot hangs on a missing data diskmedium
- Giving one more user accessmedium
- Trailing slash in rsyncmedium
- su versus su -medium
- More CPU time than elapsed timemedium
- Reading 40% iowaitmedium
- High st on a cloud VMmedium
- Low total CPU, slow servicemedium
- Which process is hammering the diskmedium
- Which config file is it readingmedium
- What vm.swappiness controlsmedium
- Dropping caches to free memorymedium
- Major and minor page faultsmedium
- Which function burns the CPUmedium
- CPU usage at 3 AM yesterdaymedium
- Capturing traffic for Wiresharkmedium
- Every first request takes 5 secondsmedium
- Thousands of TIME_WAIT socketsmedium
- Sockets stuck in CLOSE_WAITmedium
- Databases and transparent huge pagesmedium
- I/O scheduler on NVMemedium
- Finding a crash dumpmedium
- Port open locally, not from outsidemedium
- Transfers capped at 11 MB/smedium
- Restarting a crashed servicemedium
- Changing a packaged unit safelymedium
- After= without Wants=medium
- Service starts before the network is upmedium
- Running a missed nightly jobmedium
- Service shows inactive right after startmedium
- Journal empty after every rebootmedium
- Finding what slows the bootmedium
- Growing an LVM volumemedium
- Disk enlarged, df unchangedmedium
- Shrinking an XFS volumemedium
- Permissions fine, nginx still deniedmedium
- Accept rule that never matchesmedium
- Reaching a private databasemedium
- dig and the app disagreemedium
- Keeping one package at its versionmedium
- Which interface traffic will usemedium
- Changing sshd_config remotelymedium
- App keeps writing to the old logmedium
- Certificate not yet validmedium
- Passing arguments through a wrappermedium
- Reading a file one line at a timemedium
- Counter is zero after the loopmedium
- Default when a variable is unsetmedium
- Removing a file extensionmedium
- Cleaning up when a script exitsmedium
- Creating a temp file safelymedium
- Dividing numbers in Bashmedium
- Matching a file name patternmedium
- Deleting files with odd namesmedium
- Writing a script with a heredocmedium
- Parsing -e and -v flagsmedium
Hard 57
- Throttled but not busyhard
- Random packet drops on a busy nodehard
- Listen queue overflowshard
- Slow requests, idle CPUhard
- Replacing a config file safelyhard
- Binding port 443 without roothard
- Invalid cross-device linkhard
- Container takes 10 seconds to stophard
- A process kill -9 cannot stophard
- Memory cost of forkhard
- ls says 50 GB, du says 2 GBhard
- Disk 100% for users but not for roothard
- Setuid on a Bash scripthard
- Protecting a process from the OOM killerhard
- Root denied on an NFS sharehard
- Root cannot delete a filehard
- limits.conf change has no effecthard
- Bad interpreter with a ^Mhard
- RSS adds up to more than RAMhard
- %util at 100% on an NVMe drivehard
- Packet loss at one middle hophard
- Uneven speed on a two-socket serverhard
- Writes freeze for seconds at a timehard
- malloc succeeded, then OOM killhard
- Container memory near its limithard
- Reading /proc/pressure/memoryhard
- Retransmission counter climbing fasthard
- Slow, but the flame graph looks calmhard
- Running strace on a busy servicehard
- Spotting rare slow disk I/Oshard
- Latency improves under loadhard
- RAM used but no process owns ithard
- Memory held by kernel slab cacheshard
- Idle DB connections die silentlyhard
- Start request repeated too quicklyhard
- Service writes to /tmp but nothing is therehard
- Read-only file system under systemdhard
- Stopping a service kills its helpershard
- Variable set in /etc/profile is missinghard
- Cannot mount root after a hardware changehard
- New kernel will not boothard
- SSH works, big transfers hanghard
- Second NIC drops incoming traffichard
- Agent forwarding through a bastionhard
- nginx cannot bind to port 8081hard
- Many DNS queries per lookup in podshard
- Patched OpenSSL, still vulnerablehard
- Running fsck on a live filesystemhard
- Suppressed messages in the journalhard
- unary operator expectedhard
- Failure hidden inside a functionhard
- Cron job runs twice at oncehard
- Loop stops after the first hosthard
- Looping over an array safelyhard
- sed -i works on Linux, not on a Machard
- Job exited with code 143hard
- Command found, but not under sudohard