QA
🐧
DevOps & OS

Linux Commands & SysAdmin Interview Questions

Linux shell command questions covering piping, file descriptors, memory/CPU monitoring (top, htop, iostat), SSH tunnels, and network troubleshooting.

🎯 Ready to test your knowledge?

Take Linux Commands & SysAdmin Skill Assessment Quiz

First prepare from the 100 learning questions below, then test your skills with 15 random MCQs categorized into Beginner, Intermediate, and Senior levels.

Launch 15-MCQ Quiz →
Experience Level:

Showing 100 Questions

Beginner LevelLinux Commands & SysAdmin

1. How do Linux File Permissions (chmod, chown, chgrp) work in Octal and Symbolic notation?

❓ Context: Explain read (4), write (2), execute (1) permissions across User, Group, and Others scope in Linux.

Linux file permissions manage read (r=4), write (w=2), and execute (x=1) rights across three permission scopes:

1
User (u): File owner.
2
Group (g): Users in the assigned group.
3
Others (o): All other system users.

Octal Notation:

Sums permission values per scope (e.g. 'chmod 755 script.sh' assigns rwx=7 to owner, r-x=5 to group, and r-x=5 to others). 'chown user:group file' updates ownership.

bash
# Grant owner rwx (7), group r-x (5), others r-x (5)
chmod 755 deploy.sh

# Restrict file access to owner only (rw------- = 600)
chmod 600 id_rsa

# Recursively change ownership to deploy user and www-data group
sudo chown -R deploy:www-data /var/www/app
💡Linux chmod octal permission and chown ownership commands.
🎯 Interview Key Takeaway

Always assign minimum necessary file permissions (e.g. 600 for SSH keys, 755 for executable scripts).

#Linux#Permissions#chmod#chown#Beginner
Permalink
Beginner LevelLinux Commands & SysAdmin

2. What is the Linux Filesystem Hierarchy Standard (/bin, /etc, /var, /usr, /opt, /tmp)?

Beginner LevelLinux Commands & SysAdmin

3. What are File Descriptors (0=stdin, 1=stdout, 2=stderr) and Redirection (>, >>, 2>&1)?

Beginner LevelLinux Commands & SysAdmin

4. How does the Linux Pipe operator (|) chain command outputs into inputs?

Beginner LevelLinux Commands & SysAdmin

5. How do you search files using grep, egrep, and fgrep with regular expressions?

Beginner LevelLinux Commands & SysAdmin

6. How do you search for files using find by name, size, type, and modification time?

Beginner LevelLinux Commands & SysAdmin

7. How do ps, top, htop, kill, and killall manage Linux processes?

Beginner LevelLinux Commands & SysAdmin

8. How do environment variables work using export, env, and printenv?

Beginner LevelLinux Commands & SysAdmin

10. How do df and du check disk space usage and directory sizes?

Beginner LevelLinux Commands & SysAdmin

11. How do cat, less, head, and tail inspect text file contents?

Beginner LevelLinux Commands & SysAdmin

12. How do useradd, usermod, groupadd, and /etc/passwd manage users and groups?

Beginner LevelLinux Commands & SysAdmin

13. How do tar, gzip, and bzip2 create and extract compressed archives?

Beginner LevelLinux Commands & SysAdmin

14. How does SSH (Secure Shell) authentication work using ssh-keygen and ~/.ssh/authorized_keys?

Beginner LevelLinux Commands & SysAdmin

15. What basic networking commands check connectivity (ping, traceroute, curl, dig, nslookup)?

Beginner LevelLinux Commands & SysAdmin

16. How does the Cron daemon schedule recurring tasks via crontab -e?

Beginner LevelLinux Commands & SysAdmin

17. How do Linux package managers (apt, yum, dnf, pacman) manage software installation?

Beginner LevelLinux Commands & SysAdmin

18. How does systemd and systemctl start, stop, restart, and enable background services?

Beginner LevelLinux Commands & SysAdmin

19. What is the difference between sudo and su (su -)?

Beginner LevelLinux Commands & SysAdmin

20. How does shell history work (history, !$, !n, Ctrl+R)?

Beginner LevelLinux Commands & SysAdmin

21. How do which, whereis, and type locate command binaries in PATH?

Beginner LevelLinux Commands & SysAdmin

22. How do you read system load average from the uptime or top command?

Beginner LevelLinux Commands & SysAdmin

23. How do you read RAM usage using free -h (total, used, free, shared, buff/cache, available)?

Beginner LevelLinux Commands & SysAdmin

24. How does xargs pass standard input as arguments to other commands?

Beginner LevelLinux Commands & SysAdmin

25. How does the tee command write output to both terminal and a file simultaneously?

Beginner LevelLinux Commands & SysAdmin

26. How do you perform basic text substitution using sed (Stream Editor)?

Beginner LevelLinux Commands & SysAdmin

27. How does awk process space/comma-delimited text columns (print $1, $2)?

Beginner LevelLinux Commands & SysAdmin

28. What is umask and how does it determine default file permissions?

Beginner LevelLinux Commands & SysAdmin

29. How do mount, umount, and /etc/fstab manage storage filesystems?

Beginner LevelLinux Commands & SysAdmin

30. How do hostnamectl, ip addr, and ip route manage hostname and IP network routes?

Intermediate LevelLinux Commands & SysAdmin

31. How do you create a custom systemd service unit file (/etc/systemd/system/myapp.service)?

Intermediate LevelLinux Commands & SysAdmin

32. How do you inspect systemd logs using journalctl (journalctl -u myapp -f --since "1 hour ago")?

Intermediate LevelLinux Commands & SysAdmin

33. How do Local (-L), Remote (-R), and Dynamic (-D) SSH Tunnels work?

Intermediate LevelLinux Commands & SysAdmin

34. How do ss and netstat diagnose listening network ports and active socket connections?

Intermediate LevelLinux Commands & SysAdmin

35. How does lsof (List Open Files) identify processes holding file handles or network sockets open?

Intermediate LevelLinux Commands & SysAdmin

36. How does rsync efficiently sync files locally and over SSH using delta transfer algorithms?

Intermediate LevelLinux Commands & SysAdmin

37. How do variables, if/else conditionals, loops, and exit codes work in Bash scripts?

Intermediate LevelLinux Commands & SysAdmin

38. Why should every production Bash script start with set -euo pipefail?

Intermediate LevelLinux Commands & SysAdmin

39. How do iostat and vmstat diagnose disk I/O bottlenecks and CPU wait states (%iowait)?

Intermediate LevelLinux Commands & SysAdmin

40. How does strace trace process system calls and signal handling for low-level debugging?

Intermediate LevelLinux Commands & SysAdmin

41. How do UFW and iptables configure Linux packet filtering firewall rules?

Intermediate LevelLinux Commands & SysAdmin

42. What is Linux Swap Space and how does vm.swappiness (0-100) control kernel memory swapping?

Intermediate LevelLinux Commands & SysAdmin

43. What is an Inode and what happens when a Linux filesystem runs out of free inodes (df -i)?

Intermediate LevelLinux Commands & SysAdmin

44. How does logrotate manage automatic log file rotation, compression, and deletion?

Intermediate LevelLinux Commands & SysAdmin

45. How do you capture and analyze network packets using tcpdump (tcpdump -i eth0 port 80 -w capture.pcap)?

Intermediate LevelLinux Commands & SysAdmin

46. How does sysctl (/etc/sysctl.conf) dynamically tune Linux kernel parameters at runtime?

Intermediate LevelLinux Commands & SysAdmin

47. What are Special Permissions: SUID (4000), SGID (2000), and Sticky Bit (1000)?

Intermediate LevelLinux Commands & SysAdmin

48. What is Network Interface Bonding / Teaming and how does it provide network link aggregation?

Intermediate LevelLinux Commands & SysAdmin

49. How does NFS (Network File System) share remote storage directories across Linux servers?

Intermediate LevelLinux Commands & SysAdmin

50. How do Cgroups v2 manage CPU, RAM, and I/O resource limits for container engines?

Intermediate LevelLinux Commands & SysAdmin

51. What is PAM (Pluggable Authentication Modules) in Linux security?

Intermediate LevelLinux Commands & SysAdmin

52. How does SELinux (Security-Enhanced Linux) enforce Mandatory Access Control (MAC)?

Intermediate LevelLinux Commands & SysAdmin

53. How does auditd monitor file access, system calls, and user actions for security compliance?

Intermediate LevelLinux Commands & SysAdmin

54. What is Logical Volume Management (LVM) and how do PV, VG, and LV components work?

Intermediate LevelLinux Commands & SysAdmin

55. How do tmux and screen keep terminal sessions alive across SSH disconnects?

Intermediate LevelLinux Commands & SysAdmin

56. How does epoll scale I/O multiplexing compared to legacy select() and poll()?

Intermediate LevelLinux Commands & SysAdmin

57. How do lsmod, modprobe, and insmod manage dynamic Linux kernel modules?

Intermediate LevelLinux Commands & SysAdmin

58. What is the /proc virtual filesystem and how does the kernel expose runtime metrics?

Intermediate LevelLinux Commands & SysAdmin

59. How do you configure disk quotas (quotaon, edquota) to limit user disk usage?

Intermediate LevelLinux Commands & SysAdmin

60. How does Fail2ban protect SSH and web servers from brute-force authentication attacks?

Intermediate LevelLinux Commands & SysAdmin

61. How do BEGIN and END blocks and associative arrays work in advanced awk scripts?

Intermediate LevelLinux Commands & SysAdmin

62. How do sed hold space and pattern space buffer registers process multi-line text?

Intermediate LevelLinux Commands & SysAdmin

63. How does the Linux OOM Killer select processes to terminate when RAM is exhausted?

Intermediate LevelLinux Commands & SysAdmin

64. Compare Linux Filesystems: ext4 vs XFS vs ZFS vs Btrfs.

Intermediate LevelLinux Commands & SysAdmin

65. How does chrony / systemd-timesyncd synchronize system clocks using NTP?

Intermediate LevelLinux Commands & SysAdmin

66. How do ulimit -n and /etc/security/limits.conf increase maximum open file descriptors?

Intermediate LevelLinux Commands & SysAdmin

67. How is netcat (nc) used for network port scanning, file transfer, and banner grabbing?

Intermediate LevelLinux Commands & SysAdmin

68. What is the difference between /dev/random and /dev/urandom for cryptographic random numbers?

Intermediate LevelLinux Commands & SysAdmin

69. How does the watch command execute commands repeatedly at fixed intervals (watch -n 2 df -h)?

Intermediate LevelLinux Commands & SysAdmin

70. How does the at command schedule one-off future tasks in Linux?

Senior LevelLinux Commands & SysAdmin

71. How does eBPF (Extended Berkeley Packet Filter) execute sandboxed code inside the Linux kernel?

Senior LevelLinux Commands & SysAdmin

72. How does io_uring revolutionize asynchronous I/O performance over legacy libaio?

Senior LevelLinux Commands & SysAdmin

73. How do Explicit HugePages and Transparent HugePages (THP) optimize virtual memory TLB cache hits?

Senior LevelLinux Commands & SysAdmin

74. What is NUMA (Non-Uniform Memory Access) architecture and how do you prevent remote memory node latency?

Senior LevelLinux Commands & SysAdmin

75. How do kdump and crash analyze Linux kernel panic core dumps?

Senior LevelLinux Commands & SysAdmin

76. What is the PREEMPT_RT patch and how does Real-Time Linux guarantee deterministic latency?

Senior LevelLinux Commands & SysAdmin

77. How do you profile CPU performance and generate FlameGraphs using Linux perf tools?

Senior LevelLinux Commands & SysAdmin

78. How does Pressure Stall Information (PSI) measure CPU, memory, and I/O resource pressure?

Senior LevelLinux Commands & SysAdmin

79. How does TCP BBR Congestion Control optimize bandwidth and latency over lossy networks?

Senior LevelLinux Commands & SysAdmin

80. How do unshare and clone system calls create isolated Linux container namespaces?

Senior LevelLinux Commands & SysAdmin

81. How do multi-queue I/O schedulers (none, mq-deadline, kyber, bfq) optimize NVMe storage?

Senior LevelLinux Commands & SysAdmin

82. What is XDP (eXpress Data Path) and how does it execute packet filtering at the network driver layer?

Senior LevelLinux Commands & SysAdmin

83. How do ftrace, kprobes, and uprobes trace internal Linux kernel and user-space function execution?

Senior LevelLinux Commands & SysAdmin

84. What is systemd-nspawn and how does it launch lightweight OS container namespaces?

Senior LevelLinux Commands & SysAdmin

85. How does LUKS (Linux Unified Key Setup) and dm-crypt implement transparent block-device encryption?

Senior LevelLinux Commands & SysAdmin

86. How do you diagnose and tune the Netfilter Connection Tracking (conntrack) table under heavy load?

Senior LevelLinux Commands & SysAdmin

87. How do dirty_background_ratio and dirty_ratio tune Linux page cache writeback flushing?

Senior LevelLinux Commands & SysAdmin

88. How do Linux Capabilities (CAP_SYS_ADMIN, CAP_NET_ADMIN) replace binary root access?

Senior LevelLinux Commands & SysAdmin

89. How do you configure journald to forward binary logs to rsyslog or remote syslog servers?

Senior LevelLinux Commands & SysAdmin

90. How do VirtIO paravirtualized drivers accelerate KVM guest virtual machine I/O?

Senior LevelLinux Commands & SysAdmin

91. What is the difference between system-wide fs.file-max and per-process ulimit file limits?

Senior LevelLinux Commands & SysAdmin

92. How does systemd-tmpfiles manage automated volatile temporary file purging?

Senior LevelLinux Commands & SysAdmin

93. How does Linux Kernel Module Signing enforce Secure Boot integrity?

Senior LevelLinux Commands & SysAdmin

94. What is Device Mapper Multipathing (DM-Multipath) and how does it handle storage SAN path failover?

Senior LevelLinux Commands & SysAdmin

95. How do somaxconn and tcp_max_syn_backlog prevent dropped TCP socket connections under load?

Senior LevelLinux Commands & SysAdmin

96. How does bpftool inspect loaded eBPF programs, maps, and link attachments?

Senior LevelLinux Commands & SysAdmin

97. What is the Cgroup Freezer subsystem and how does it suspend running process trees?

Senior LevelLinux Commands & SysAdmin

98. How does Kernel Address Space Layout Randomization (KASLR) protect against kernel exploits?

Senior LevelLinux Commands & SysAdmin

99. How does WireGuard operate inside the Linux kernel compared to OpenVPN?

Senior LevelLinux Commands & SysAdmin

100. What is the future trajectory of Linux (Rust in the Linux Kernel, eBPF revolution, and real-time kernels)?

How to Prepare for Linux Commands & SysAdmin Technical Interviews in 2026

When interviewing for software engineering positions that utilize Linux Commands & SysAdmin, hiring managers look for a combination of fundamental syntax proficiency, architectural understanding, code optimization techniques, and practical debugging skills.

🌱 Beginner FocusCore syntax, default configurations, standard API definitions, and avoiding common basic errors.
⚡ Intermediate FocusAsync execution patterns, performance profiling, component lifecycle, and state management.
🏆 Senior FocusInternal runtime mechanics, memory leaks, scalability bottlenecks, system design trade-offs, and security mitigation.