Cheatsheet: Linux Internals


- PDF Link: cheatsheet-linuxinternals-A4.pdf, Category: interview
- Blog URL: https://cheatsheet.dennyzhang.com/cheatsheet-linuxinternals-A4
- Related posts: CheatSheet: Leetcode For Code Interview, CheatSheet: Well-Known Papers For IT Industry, #denny-cheatsheets
1.1 Reference
1.2 Top 15 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 inode | Github Link |
5 | Explain how OS schedules processes | Github Link |
6 | Explain linux virtual filesystem | Github Link |
7 | epoll VS poll VS select | Github Link |
8 | Explain spinlock | Github Link |
9 | Explain linux signal | Github Link |
10 | Explain RAID | Github Link |
11 | Explain linux fork | |
12 | What is /proc directory? | |
13 | How to solve ssh “Connection refused” errors? | |
14 | How to daemonize a process? | |
15 | What are common scenarios of linux kernel panics? | |
16 | What are coredump and kdump? | |
17 | Program startup process in userspace | Link: Program startup process in userspace |
18 | What is init program? |
1.3 Explain Top Linux Tooling
Num | Name | Summary |
---|---|---|
1 | Explain the output of vmstat command |
Github Link |
2 | Explain the output of netstat command |
Github Link |
3 | Explain the output of free command |
Github Link |
4 | Explain the output of top command |
Github Link |
5 | Explain the output of sar command |
system staticstics with sysstat cronjob |
6 | Explain the output of df command |
1.4 Top 15 Linux Workflow
Num | Name | Summary |
---|---|---|
1 | What happens, when opening https://www.google.com | 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 how system call works | Github Link |
8 | Explain hostname to ip address mapping workflow | Github Link |
9 | Explain init.d workflow | Github Link |
10 | Explain how to build a linux release | Github Link |
11 | Explain how kernel schedules process | Github Link |
12 | Explain how kernel read data from disk | Github Link |
13 | Explain how systemtap works | Github Link |
14 | Explain how I/O interrupt works | Github Link. Top half, bottom half, interrupt handler |
15 | Speed up I/O | Linux sendfile with zero-copy, mmap: map file to ram |
1.5 Linux Trouble Shooting
Num | Name | Summary |
---|---|---|
1 | Figure out who has logged to server now and previously? | w, last, lastb; lastlog; /var/run/*tmp |
2 | Forget root password. How to reset it? | Reset from GRUB or liveCD |
3 | How does sudo work? Given sudo , why people may need su ? |
|
4 | How to close stdin/stdout/stderr of one command | some_command </dev/null >/dev/null 2>&1 |