Linux and Scripting interview questions
100 Cloud & DevOps practice questions. Read what a strong answer covers, then practise it out loud against the clock.
Practise Linux and Scripting questionsBeginner
- A process is using 100 percent CPU
- Archiving and compressing files
- Basic Linux networking commands
- Cannot SSH into a server
- Checking CPU and memory usage
- Checking disk usage
- Copying files between servers
- Cron job isn't running
- Editing files on servers
- Environment variables
- Exit codes
- Finding errors in a large log file
- Finding files with find
- grep, sed and awk
- Hard links vs symbolic links
- Linux file permissions
- Making a script stop on errors
- Managing services with systemd
- Package managers in Linux
- Permission denied when running a script
- Pipes and redirection
- Processes and signals
- Renaming many files at once
- Scheduling jobs with cron
- Server says disk is full
- Service doesn't start after reboot
- Service fails because the port is in use
- Simple health-check script for a website
- SSH and key-based authentication
- The Linux filesystem hierarchy
- Users, groups and sudo
- What a shell is
- Where to find logs on Linux
- Writing a basic Bash script
Intermediate
- Automating TLS certificate renewal on a server
- Clock drift causing failures
- Configuration management with Ansible
- Deleted log file still filling the disk
- File descriptor limits
- Filesystems, mounts and inodes
- Finding top IP addresses in access logs
- Functions and argument handling in Bash
- Granting a developer limited server access
- Keeping servers patched safely
- Linux firewalls
- Linux memory management and the OOM killer
- Log rotation
- Namespaces and cgroups
- Process killed unexpectedly
- Processing a huge CSV on the command line
- Processing JSON on the command line with jq
- Quoting and common Bash pitfalls
- Reaching a private database through a bastion
- Running a command on 50 servers
- Script works locally but fails on the server
- SELinux and AppArmor
- Server can't resolve hostnames
- Server is swapping heavily
- Server slow but CPU usage is low
- Speeding up a slow loop with parallelism
- Terminal multiplexers
- Turning a script into a managed service
- Understanding load average
- When to use Bash vs Python for automation
- Writing a reliable backup script
- Writing idempotent scripts
- Zombie processes accumulating
Experienced
- Application hangs on network filesystem
- Auditing who changed what on servers
- Building golden images with Packer
- Centralising logs from hundreds of servers
- Container hosts keep running out of disk
- Controlling resources with systemd and cgroups v2
- Debugging with strace and perf
- Disk shows free space but writes fail
- eBPF for Linux troubleshooting
- High CPU steal time on VMs
- Immutable servers in Linux operations
- Instances take too long to boot during autoscaling
- Kernel tuning with sysctl
- Linux performance analysis methodology
- One process starving others on a shared host
- Outbound connections fail under load
- Patching 500 servers for a critical vulnerability
- Periodic latency spikes on a Linux host
- Proxy fails at high connection counts
- Rebuilding a critical server after disk failure
- Replacing SSH keys scattered across servers
- Secrets exposed in shell history and process lists
- Security risks in shell scripts
- Server crashes with kernel panics
- Server hardening
- Servers in the same group behave differently
- Suspecting a compromised Linux server
- TCP connection states and TIME_WAIT
- Testing and linting shell scripts
- The Linux boot process and recovery
- Triage a struggling production server in minutes
- Turning ad hoc ops scripts into a maintainable toolkit
- Untangling a fragile 2,000-line Bash deployment script