Linux Interview Questions
Processes & threads, file permissions, links, pipes & redirection, signals, the boot process, the filesystem hierarchy, cron, users and shell fundamentals.
61 questions
Popular Searches
1. What is the difference between a process and a thread in Linux?
mediumProcesses & Concurrency 7 mins2. What are the standard streams stdin, stdout, and stderr in Linux?
easyShell & I/O 6 mins3. What is the difference between a hard link and a symbolic link in Linux?
mediumFilesystem 7 mins4. What do the Linux file permissions rwx mean and how does chmod work?
easyPermissions 6 mins5. What is the difference between absolute and relative paths in Linux?
easyFilesystem 6 mins6. What is a pipe in Linux and how does it connect commands?
easyShell 6 mins7. What is the difference between grep, sed, and awk in Linux?
mediumText Processing 7 mins8. What is the difference between a foreground and a background process in Linux?
easyProcess Management 6 mins9. What are signals in Linux and what do SIGTERM, SIGKILL, and SIGHUP do?
mediumProcess Management 7 mins10. What is the difference between kill, kill -9, and killall in Linux?
easyProcess Management 6 mins11. How does the Linux boot process work from BIOS to init?
mediumBoot Process 7 mins12. What is the difference between a shell and a terminal in Linux?
easyCommand Line Basics 5 mins13. What is the difference between the su and sudo commands in Linux?
easyUser & Permissions 6 mins14. What is the Linux inode and what information does it store?
mediumFilesystem 7 mins15. How does process scheduling work in Linux and what is the nice value?
hardProcesses 8 mins16. What is the difference between /etc/passwd and /etc/shadow in Linux?
easyUser Management 6 mins17. How do environment variables work in Linux and what is the PATH?
easyShell 6 mins18. What is the difference between the > and >> redirection operators in Linux?
easyShell 6 mins19. How does cron work in Linux for scheduling jobs?
mediumScheduling 6 mins20. What is a zombie process and an orphan process in Linux?
mediumProcesses 6 mins21. What is the difference between the ps and top commands in Linux?
easyProcess Monitoring 6 mins22. How does the Linux filesystem hierarchy work with directories like /bin, /etc, /var?
easyFilesystem 6 mins23. What is a file descriptor in Linux and how does it relate to open files?
mediumProcesses and I/O 7 mins24. What is the difference between mount and umount in Linux?
easyFilesystem 6 mins25. How do you find and manage disk usage in Linux with df and du?
easyFilesystem 6 mins26. What is the difference between exit code 0 and a non-zero exit code in Linux?
easyShell Scripting 6 mins27. How does the chmod octal notation work in Linux (e.g. 755, 644)?
mediumPermissions 7 mins28. What is the difference between a login shell and a non-login shell in Linux?
mediumShell & Environment 7 mins29. How do you search for files in Linux with find and locate?
easyFile Management 6 mins30. What is the difference between ln, cp, and mv in Linux?
easyFile Management 6 mins31. How do you debug a systemd service that keeps restarting or fails to start?
mediumService Management 8 mins32. Why does free -m show almost no free memory, and what does 'available' really mean?
hardMemory & Performance 8 mins33. How does the Linux OOM killer choose a victim, and how do you investigate an OOM kill?
hardMemory & Performance 9 mins34. A process is hung and consuming no CPU. How do you find out what it is waiting on?
hardDebugging & Tracing 9 mins35. What are cgroups v2 CPU controls, and how do you detect CPU throttling in a container?
hardResource Control 9 mins36. Which Linux namespaces make a container, and how do you inspect them on a running process?
hardContainers & Isolation 9 mins37. A service fails with 'Too many open files'. How do you diagnose and raise the right limit?
mediumResource Limits 8 mins38. Why can Linux load average be high while CPU utilisation is low?
hardMemory & Performance 8 mins39. What do TIME_WAIT and CLOSE_WAIT mean on a Linux server, and how do you investigate them?
hardNetworking 9 mins40. df reports the filesystem is full but du shows far less usage. What is going on?
hardStorage & Filesystems 9 mins41. Storage feels slow. How do you decide whether the device, the queue or the application is at fault?
hardStorage & Filesystems 9 mins42. Clients report connection timeouts under load while the server looks idle. How do you investigate the listen backlog?
hardNetworking 9 mins43. How do you investigate packet drops and errors on a Linux network interface?
hardNetworking 9 mins44. How do you cap a service's memory and CPU with systemd resource control, and what happens at the limit?
mediumService Management 8 mins45. journald is dropping messages and filling the disk. How do you configure retention and rate limiting?
mediumLogging & Observability 8 mins46. A filesystem on LVM is nearly full. How do you extend it online without downtime?
mediumStorage & Filesystems 8 mins47. How do you change a kernel tunable safely and make it persist across reboots?
mediumKernel & Tuning 8 mins48. A process is pinned at full CPU. How do you find which code path is responsible?
hardDebugging & Tracing 9 mins49. What is NUMA on a Linux server, and how do you detect and control NUMA effects?
hardKernel & Tuning 9 mins50. Logs across your servers are out of order. How do you diagnose and fix clock drift on Linux?
mediumTimekeeping 8 mins51. Public key SSH login fails while password login works. How do you debug it?
mediumSecurity & Access 9 mins52. A filesystem has remounted read-only in production. How do you investigate and recover?
hardStorage & Filesystems 9 mins53. Load average is 40 on an 8-core box but CPU is nearly idle. What is happening and how do you prove it?
hardPerformance & Troubleshooting 9 mins54. Summing RSS across processes exceeds total RAM. Explain Linux memory accounting and what you should measure instead.
hardMemory Management 10 mins55. How does the kernel choose which process the OOM killer terminates, and how do you influence that choice safely?
hardMemory Management 10 mins56. A service fails with resource errors under load though the machine looks healthy. Which per-process and kernel limits run out first, and how do you find the one that bit you?
hardResource Limits 10 mins57. Writes fail with 'No space left on device' but df shows free space. What are the possible causes?
mediumStorage & Filesystems 9 mins58. How do you use lsof as a first-response tool during an incident, and what can it tell you that other tools cannot?
mediumDebugging & Tooling 9 mins59. A service starts before its database or network is ready and crashes on boot. How do you express the dependency correctly in systemd?
hardSystemd & Init 10 mins60. Why does Ctrl+C stop a whole pipeline, and why do background jobs die when you close the terminal?
mediumProcesses & Signals 9 mins61. dmesg shows a kernel call trace after an outage. How do you read it and decide what to do?
hardKernel & Diagnostics 10 mins