Operations 18 min read

Master the Linux Ops Interview: 35 Essential Questions & Answers

This article compiles 35 Linux operations interview questions—including multiple‑choice, coding, and essay topics—along with detailed answers covering VLANs, system calls, IP addressing, TCP/UDP, process handling, data structures, and networking fundamentals to help candidates prepare effectively.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Master the Linux Ops Interview: 35 Essential Questions & Answers

Below is a curated set of Linux operations interview questions and answers, divided into multiple‑choice and essay sections, designed to test and reinforce knowledge of networking, system calls, protocols, data structures, and related concepts.

First Part: Multiple‑Choice Questions

1. Which statement about VLAN is incorrect? A. Users in different VLANs can communicate directly B. Workstations of a VLAN can be in different LANs C. VLAN is a logical group of LAN subnets independent of physical location D. VLAN can flexibly control broadcast traffic

2. Which description of a system call is wrong? A. The called process runs in "user mode" B. System calls provide various OS services C. System calls forward application requests to the kernel D. System calls protect operations that must run in kernel mode

3. Which IP address can be assigned to a host? A. 256.1.3.4 B. 197.3.11.0 C. 199.5.89 D. 11.15.33.235

4. A frog can jump 1, 2, …, n steps at a time. How many ways can it reach an n‑step stair? A. 2^(n‑1) B. 2*(n‑1) C. 2^n D. 2n

5. After evaluating the expression a = 5 ? 0 : 1, what is the final value of a? A. 5 B. 1 C. 0 D. true

6. In base‑n arithmetic, which n satisfies 567 × 456 = 150216? A. 9 B. 12 C. 13 D. 18

7. For network address 172.16.0.0 with mask 255.255.224.0, which statement is correct? A. One subnet broadcast address is 172.16.32.255 B. One subnet broadcast address is 172.16.128.255 C. The division creates 8 usable subnets D. The division creates 6 usable subnets

8. Given probabilities Pa and Pb for a driver accepting orders A and B respectively, what is the probability the driver chooses A when both orders are sent? A. Pa B. Pa × (1‑Pb) C. Pa × (1‑Pb) / (1‑Pa × Pb) D. [1‑(1‑Pa)(1‑Pb)] × Pa / (Pa+Pb)

9. Which TCP connection state cannot appear on the side that actively closes the connection? A. CLOSE_WAIT B. FIN_WAIT2 C. TIME_WAIT D. FIN_WAIT1

10. Which statement about TCP and UDP is correct? A. Both are connectionless B. TCP is connectionless, UDP is connection‑oriented C. TCP suits unreliable WANs, UDP suits reliable LANs D. TCP suits reliable LANs, UDP suits unreliable WANs

11. In a GCC environment, given int arr[5]={1,2,3,4,5};, what is the result of *(*(&arr+1)-1)? A. 1 B. 0 C. 4 D. 5

12. In the figure (six squares a‑g, a side length n), what is the area of the red region? A. 65 n² B. 75 n² C. 80 n² D. 85 n²

13. A frog can jump any number of steps from 1 to n. How many ways to reach an n‑step stair? A. 2^(n‑1) B. 2*(n‑1) C. 2^n D. 2n

14. Which line in the shown code is most likely to cause a runtime error? A. 1 B. 2 C. 3 D. 4

15. Given preorder abcdefg and inorder bcedagf of a binary tree, what is its postorder? A. edbcgfa B. edcbfga C. edcbgfa D. ecdbgfa

16. In Linux, a file with permissions -rw‑wx‑x corresponds to which octal number? A. 641 B. 742 C. 652 D. 651

17. Which group of protocols belongs to the network layer? A. IP, TCP, UDP B. ARP, IP, UDP C. FTP, SMTP, Telnet D. ICMP, ARP, IP

18. Five elements A‑E are pushed onto a stack in order; they may be popped at any time. How many possible pop sequences exist? A. 41 B. 42 C. 43 D. 44

19. How many iterations does the loop in the shown code execute? A. 10 B. 11 C. 12 D. 20

20. What is the output of the program shown? A. 6.25 B. 6 C. 24 D. 25

21. On a 64‑bit system, what is sizeof(struct B) for the given structure? A. 24 B. 32 C. 40 D. 20

22. How many processes are created by the program shown? A. 10 B. 100 C. 1024 D. 2048

23. Which description of a system call is incorrect? A. The called process runs in "user mode" B. System calls provide various OS services C. System calls forward application requests to the kernel D. System calls protect operations that must run in kernel mode

24. Which action converts a logical address to a physical memory address? A. Compilation B. Relocation C. Linking D. Execution

25. Which of the four necessary deadlock conditions is unrealistic to break? A. Mutual exclusion B. No preemption C. Hold and wait D. Circular wait

26. Given Huffman frequencies a:1, b:1, c:2, d:3, e:5, f:8, g:13, h:21, what string does the code 110111100111010 represent? A. fdheg B. ecgdf C. dchfg D. fehdg

27. What is the space complexity of the algorithm shown? A. O(1) B. O(n) C. O(n!) D. O(n^2)

28. What is the postfix expression of a‑b*(c‑d)/e+f? A. abcd‑*e/‑f+ B. abcde‑*/‑f+ C. abcde*‑/‑f+ D. abcd*‑e/‑f+

29. With 256 bottles of liquid, one poisonous, and only a 2‑hour test window (each test takes 2 hours), what is the minimum number of mice needed to identify the poisonous bottle? A. 7 B. 8 C. 9 D. 255

Reference Answers

1‑5: A A D A C

6‑10: D D D A C

11‑15: D D A B C

16‑20: D D B A C

21‑25: B D A B A

26‑29: A B A B

Second Part: Essay Questions

30. Explain the working principle of traceroute. Answer: traceroute sends UDP packets with incrementally increasing TTL values; when a router discards a packet because TTL reaches zero it returns an ICMP "time exceeded" message, revealing the hop. When the destination host receives the packet it replies with ICMP "port unreachable", indicating the final hop.

31. Describe what happens after entering a URL like http://www.didichuxing.com in a browser, covering browser, network (UDP/TCP/HTTP), and server interactions. Answer: 1) DNS resolution (browser cache → OS cache → router → ISP DNS → root → TLD → authoritative server). 2) TCP three‑way handshake with the server (SYN, SYN‑ACK, ACK). 3) HTTP request (GET/POST) with headers (Host, User‑Agent, Connection, Cookie, etc.). 4) Server processes request and sends HTTP response, which the browser renders.

32. Define variable a for each of the following: 1) an integer 2) a pointer to an integer 3) a pointer to a pointer to an integer 4) an array of 10 integers 5) an array of 10 pointers to integers 6) a pointer to an array of 10 integers 7) a pointer to a function taking an int and returning int 8) a pointer to a function taking an int and returning int Answer:

int a;
int *a;
int **a;
int a[10];
int *a[10];
int (*a)[10];
int (*a)(int);
int (*a)(int);

33. Summarize the DNS lookup process for www.didichuxing.com. Answer: 1) Browser checks local hosts file. 2) Checks OS DNS cache. 3) Queries the configured recursive resolver; if authoritative data exists locally, it returns. 4) If not cached, resolver queries root servers, then TLD (.com) servers, then authoritative name servers, following possible referrals, until the final A record is obtained and returned.

34. Design a data structure to store numbers in the range 0‑2³² using 4 GB of memory, supporting arbitrary insert/delete operations. Provide the design idea and code. Answer: (Design omitted for brevity; code image retained below.)

35. List common server models you have used and how you employed them. Answer: Synchronous blocking, multi‑process, multi‑thread, select + multi‑thread, epoll + multi‑thread, epoll + thread pool.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

TCPLinuxinterviewNetworkingsystem callsUDP
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.