Fundamentals 5 min read

Top Linux Interview Questions: From Basics to Security and Scripting

This article presents a comprehensive set of Linux interview questions covering basic file handling, process management, networking, security concepts, HTTP protocols, load balancing, and Python scripting, providing clear tasks and explanations for each topic.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Top Linux Interview Questions: From Basics to Security and Scripting

Part 1: Linux Basics

Question 1: There are 100 image files with URLs http://down.xiaomi.com/img/1.png … http://down.xiaomi.com/img/100.png. Download all images in batch and identify files larger than 500 KB.

Question 2: The file info.txt contains lines like “aa,201”. Sort the file by the numeric second column in descending order.

Question 3: Check whether the current Linux server is listening on port 80; if it is, find the process ID and terminate the process.

Question 4: Use curl or wget to retrieve the HTTP header of a service.

Question 5: Which statements about Linux user accounts are correct? (A‑D options about password storage and verification.)

Question 6: For a RAID array of N disks, which statement is false? (Options about RAID 1, RAID 5, RAID 0 performance and reliability.)

Question 7: List at least three common load‑balancing software and discuss their drawbacks.

Question 8: After running time sleep 2, explain the meaning and difference of the “real”, “user”, and “sys” times.

Question 9: Explain the meanings of last, break, redirect, and permanent in an Nginx rewrite rule.

Question 10: Describe the difference between web cookies and sessions.

Question 11: Compare HTTP 1.0, HTTP 1.1 and list the main changes or advantages of HTTP 2.0.

Part 2: Security

Question 12: List at least three common web security issues, explaining their principles and potential damage.

Question 13: Enumerate common DoS attack types, describing their principles and mitigation methods.

Question 14: If a server is compromised, what steps should a security administrator take?

Part 3: Networking

Question 15: Briefly describe the three‑way handshake process of TCP.

Question 16: Analyze why a system may have many TIME_WAIT sockets and propose at least three optimization suggestions.

Part 4: Python

Question 17: Compare xrange and range in Python.

Question 18: Given two lists A and B, show a fast Python method to obtain their common elements.

Question 19: Twenty servers need to execute echo "123" concurrently, with at most five servers running in parallel. Provide the relevant Python or shell code.

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.

LinuxSecurityNetworkingShell scripting
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.