Using CheatSheets To Apply Best Practices

Cheatsheet: SRE/DevOps/Sysadmin

Cheatsheet: SRE/DevOps/Sysadmin

1.2 Good Mindsets

Num Name Summary
1 First thing: Stop The Bleed  
2 Pets VS Cattles  
3 Fix a process VS Fix a problem  
4 Evaluate Business Impact First  
5 Prevention VS Treatment  
6 Postmortem Culture  
7 Understand Workflow & Use Cases Crucial for trouble shooting
8 Automation VS Convention  
9 Principle Of Least Privilege  
10 Design Tools VS Use Tools Operational knowledge is not good enough

1.3 Top 15 Linux Workflow

Num Name Summary
1 What happens, when opening Github Link
2 What happens, when “ls -l *” Github Link. shell, expansion, fork
3 What happens, when “Ctrl + c” in a terminal Github Link. i/o interrupt, SIGINT, sig handler
4 What happens, when “touch a.txt” Github Link
5 What happens, when you press power on button in a server? Github Link. bios, mbr, grub, init, runlevel
6 What happens, when “cat /etc/hosts” Github Link
7 Explain init.d workflow Github Link
8 Explain how to build a linux release Github Link
9 Explain how kernel schedules process Github Link
10 Explain how kernel read data from disk Github Link
11 Explain how I/O interrupt works Github Link. Top half, bottom half, interrupt handler
12 Explain how system call works Github Link
13 Explain how virtual memory works Github Link

1.4 Top 20 Linux Basic Questions

Num Name Summary
1 Thead VS Process [[][Github Link]
2 Explain virtual memory Github Link
3 Explain paging and paging fault Github Link
4 Explain the output of vmstat command Github Link
5 Explain the output of top command  
6 Explain the output of sar command  
7 What is /proc directory?  
8 Forget root password. How to reset it?  
9 How to solve ssh “Connection refused” errors?  
10 How to daemonize a process?  
11 What are common scenarios of linux kernel panics?  
12 What are coredump and kdump?  
13 Program startup process in userspace Link: Program startup process in userspace
14 What’s your favorite shell and why? Link: Bash vs Zsh
15 Figure out who has logged to server now and previously? w, last, lastb; lastlog; /var/run/*tmp
16 How to choose RAID levels for different scenarios?  
17 What is init program?  
18 How does sudo work? Given sudo, why people may need su?  
19 How linux signal trap works? And what signals can’t be ignored  
20 How to close stdin/stdout/stderr of one command some_command </dev/null >/dev/null 2>&1
21 Linux sendfile with zero-copy  

1.5 Top 20 Linux Advanced Questions

Num Name Summary
1 Explain Linux security model nothing-or-all model, capability, extended attributes, selinux, etc
2 Whether it’s possible to sniff HTTPS traffic? And why?  
3 Figure out what critical commands ssh users have issued?  
4 Why is I/O uninterruptible?  
5 Explain shell features shell pipes, filename wildcards, env var expansion, alias, etc
6 What is the difference between UNIX and Linux  
7 What is Virtual Memory?  
8 What is localhost and why would ping localhost fail?  
9 How does the Linux kernel handle a system call Link: System calls in the Linux kernel
10 Difference between ext3 and ext4  
11 How do you feel about systemd? Init processes start serially, long booting time
12 ssh port forwarding VS ssh reverse port forwarding  
13 How to quickly crash an linux machine?  
14 How to deprovision a user completely?  
15 How reliable history command is? And how to alleviate the problem? ~/.bash_history, $HISTTIMEFORMAT env
16 how to generate a zombie process  
17 With bg in one terminal, jobs doesn’t show in another terminal  
18 How to setup http proxy with SLA for different traffic?  
19 What’s your wishlist for linux?  
20 What’s your ideal monitoring system in your imagination?  

1.6 Top 20 SRE Questions

Num Name Summary
2 How to do a online rolling upgrade for a given system? Single node, or multiple node?
3 How you migrate legacy on-prem app to cloud-native in public cloud?  

1.7 Top 20 Container Questions

Num Name Summary
1 Compare to Linux process, what things containers can’t support?  
2 How to sniff container’s traffic?  
3 Explain the workflow of “docker stop $containerid  

1.8 Top 10 Networking Questions

Num Name Summary
1 Difference between switch and router? L2, L3
2 What is a DNS amplification attack?  
3 Difference between L2 and L3 switch?  
4 What is TCP SYN scan? How it’s conducted?  
5 Which port ICMP is using? Neither TCP or UDP. Link
6 Proxy server vs Loadbalancer. Proxy server vs Reverse proxy server  
7 Brief introduction about 802.1x  
8 List all methods which can stop one ip ssh to the server  
9 Explain how iptable routing rules works  

1.10 More Resources

Leave a Reply

Your email address will not be published. Required fields are marked *