Operations 35 min read

Essential Linux Ops Interview Q&A to Boost Your Salary

This article compiles a comprehensive set of Linux operations interview questions and answers, covering topics such as the definition of ops, server management, RAID configurations, load‑balancing solutions, middleware, MySQL troubleshooting, scripting tasks, network diagnostics, and best‑practice optimizations for high‑pay sysadmin roles.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Essential Linux Ops Interview Q&A to Boost Your Salary

What is Operations? What is Game Operations?

Operations (Ops) refers to the maintenance of an organization’s established network hardware and software to ensure services run smoothly. It encompasses networking, systems, databases, development, security, and monitoring, with specializations such as DBA Ops, website Ops, virtualization Ops, monitoring Ops, and game Ops. Game Ops is divided into development Ops, application Ops, and system Ops, each providing tools, infrastructure, and support for the others.

Interaction with Operations Personnel

Game operations staff coordinate launch times, server counts, user acquisition, and activity planning, and communicate with platform partners.

Managing 300 Servers

Set up a jump host with unified accounts for secure access.

Use Salt, Ansible, or Puppet for centralized configuration management.

Maintain a simple CMDB containing system, configuration, and application information for each server.

RAID 0/1/5 Overview

RAID aggregates disks into a single logical volume, providing performance and redundancy. RAID 0 offers the highest read/write speed but no redundancy. RAID 1 mirrors data across two disks, providing redundancy and better read performance. RAID 5 distributes parity across at least three disks, offering a balance of redundancy and performance. The article also discusses suitable RAID choices for different server roles.

LVS, Nginx, HAProxy Differences and Selection

LVS operates at layer 4 (IP forwarding), suitable for very high concurrency. HAProxy works at layers 4 and 7, offering professional proxy features. Nginx is a web server, cache, and reverse proxy that operates at layer 7. For small‑to‑medium traffic, HAProxy or Nginx is sufficient; for large‑scale traffic, LVS is preferred.

Squid, Varnish, and Nginx Proxy Comparison

All three are proxy servers. Squid and Varnish specialize in caching; Varnish has higher performance and flexible invalidation, while Squid offers extensive documentation. Nginx can act as a reverse proxy via modules but lacks built‑in caching features.

Tomcat vs. Resin

Tomcat has a larger user base and better Java compatibility, while Resin offers higher performance and is favored by large enterprises.

Middleware and JDK

Middleware is independent software that enables distributed applications to share resources across different platforms. JDK is the Java Development Kit used to build Java applications.

Tomcat Ports 8005, 8009, 8080

8005 – shutdown port, 8009 – AJP connector, 8080 – standard HTTP port.

CDN and Gray Release

CDN distributes content to edge locations for faster user access. Gray release (or canary deployment) gradually rolls out changes to a subset of users to ensure stability before full rollout.

DNS Resolution Process

The client checks the local hosts file, then the configured DNS server, followed by root, top‑level, second‑level, and finally authoritative servers to resolve a domain name.

RabbitMQ

RabbitMQ is a message‑queue middleware that stores messages during transmission, ensuring reliable delivery even when receivers are temporarily unavailable.

Keepalived Working Principle

Based on VRRP, a MASTER router continuously sends announcements; BACKUP routers listen and take over if the MASTER fails, with fast (<1 s) failover.

LVS Three Modes

VS‑NAT : The load balancer rewrites the destination IP to a real server’s IP.

VS‑TUN (IP Tunnel) : The load balancer encapsulates packets; real servers reply directly to the client.

VS‑DR (Direct Routing) : Both load balancer and real servers share the virtual IP; the balancer only forwards requests.

MySQL InnoDB Lock Diagnosis & Replication Lag Reduction

Use SHOW ENGINE INNODB STATUS and the InnoDB tables innodb_trx, innodb_locks, and innodb_lock_waits to locate lock issues. Reduce replication delay by improving hardware, enabling multi‑threaded replication, optimizing slow queries, and tuning parameters such as --slave-net-timeout and --master-connect-retry.

Resetting MySQL root Password

Methods include using mysqladmin, updating the mysql.user table directly, or starting MySQL with --skip-grant-tables to reset the password.

LVS/Nginx/HAProxy Pros & Cons

Nginx offers rich layer‑7 features, easy configuration, and good performance for HTTP/HTTPS. LVS provides high throughput at layer‑4 with low CPU/memory usage but lacks regex support. HAProxy combines layer‑4 speed with layer‑7 capabilities, supporting TCP load balancing and many algorithms.

MySQL Backup Tools

mysqldump

– logical backup, suitable for small datasets.

LVM snapshots – physical backup of the data directory.

Percona XtraBackup – fast physical hot backup for InnoDB.

Keepalived Health‑Check Configuration Example

vrrp_instance VI_1 {
    state MASTER
    interface eth0
    virtual_router_id 51
    priority 100
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        192.168.1.100
    }
    track_script {
        chk_http
    }
}

vrrp_script chk_http {
    script "curl -s -o /dev/null http://127.0.0.1/health"
    interval 2
    weight -2
}

Common Command‑Line Tasks (Selected)

Find top 10 IPs by request count:

cat access.log | awk '{print $1}' | sort | uniq -c | sort -rn | head -10

Capture traffic to port 80: tcpdump 'host 192.168.1.1 and port 80' > tcpdump.log Redirect port 80 to 8080:

iptables -t nat -A PREROUTING -d 192.168.2.1 -p tcp --dport 80 -j DNAT --to-destination 192.168.2.1:8080

Script to ping all hosts in 192.168.1.0/24 and report status.

Log rotation: keep only the latest 7 days using find /app/logs -type f -mtime +7 -name "*.log" -delete.

Extract eth0 IP with

ifconfig eth0 | grep 'inet addr' | cut -d ':' -f2 | cut -d ' ' -f1

(alternatives with awk and sed).

Linux Optimization Checklist

Use non‑root users with sudo.

Change default SSH port and disable root login.

Synchronize system time automatically.

Configure local yum mirrors.

Disable SELinux and unnecessary iptables rules.

Increase file descriptor limits.

Trim unnecessary startup services.

Tune kernel parameters via /etc/sysctl.conf.

Set appropriate locale and lock critical system files.

TCP/IP Seven‑Layer Model

Application, Presentation, Session, Transport (TCP/UDP), Network (IP/ICMP), Data Link (MAC), Physical layers are described with typical protocols and functions.

Nginx Modules Frequently Used

rewrite – URL rewriting.

access – access control.

ssl – encryption.

gzip – response compression.

proxy – forward requests.

upstream – define backend servers.

cache_purge – clear cached content.

Web Server Load Architecture Examples

Nginx, HAProxy, Keepalived, LVS.

Additional Tools and Scripts

Examples include scripts for concurrent request monitoring, TCP connection state analysis, and automated backup of website directories.

Overall, the article provides a practical interview‑ready reference for Linux system administrators, covering theory, command‑line techniques, troubleshooting, and best practices.

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.

LinuxmysqlScripting
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.