Operations 17 min read

Essential Linux Operations Interview Questions & Answers from Meituan

This article compiles Meituan's Linux operations engineer interview requirements, common questions on system installation, networking, scripting, MySQL security, replication, iptables, and provides detailed command-line solutions and sample scripts to help candidates prepare effectively.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Essential Linux Operations Interview Questions & Answers from Meituan

Meituan Linux Operations Engineer Interview Overview

Job Definition : System Operations Engineer

Salary : 15K‑30K

Basic Requirements : Beijing‑Chaoyang, no degree limit, 3‑5 years experience

Job Responsibilities

Design and optimize operation solutions such as flexible disaster recovery, intelligent scheduling, elastic scaling, and attack mitigation.

Lead operability design of business architecture and participate in system design and implementation.

Develop efficient automation tools to improve operational efficiency.

Perform comprehensive performance optimization.

Accurately calculate capacity and plan to reduce operational costs.

Explore and research new operation technology directions.

Candidate Qualifications

3+ years of operations experience with deep knowledge of monitoring, automated deployment, capacity management, and disaster recovery.

In‑depth understanding of Linux OS principles and TCP/IP, common RPC protocols.

Proficient in 1‑2 languages such as C, PHP, Python, or Shell with development experience.

Strong communication, coordination, project management, and responsibility.

High technical sensitivity, analytical thinking, and passion for solving challenging problems.

Sample Interview Questions and Answers

1. Common methods to install/uninstall Linux software

A. Remove RPM package: rpm -e package_name.rpm (add --nodeps to ignore dependencies).

B. yum remove package_name – not recommended because it may uninstall dependent packages.

C. Source package removal: navigate to the installation directory and run make uninstall or delete the directory.

2. Common remote connection tools for Windows and Linux

Command‑line tools: Xshell, SecureCRT, PuTTY, SSH client, etc.

Graphical tools: Xmanager (requires service and port 177), VNC‑Viewer (install vncserver on Linux), Windows Remote Desktop (requires xrdp and VNC on Linux).

3. How to modify Linux IP address, gateway, and hostname

A. Edit /etc/sysconfig/network-scripts/ifcfg-eth0 and set IPADDR and GATEWAY with BOOTPROTO=static.

B. Edit /etc/sysconfig/network and change HOSTNAME.

4. Script to back up /var/mylog daily at 5 AM and upload via FTP

#!/bin/bash
bakdir=mylog
date=$(date +%F)
cd /var
tar zcf ${bakdir}_${date}.tar.gz ${bakdir}
ftp -n <<EOF
open 192.168.142.129
user aaa bbb
put ${bakdir}_${date}.tar.gz
bye
EOF
rm -f ${bakdir}_${date}.tar.gz

Add to crontab: 00 05 * * * /bin/bash /root/mylogbak.sh 5. iptables related commands (answers to be contributed by the community).

6. MySQL security hardening after fresh installation

Change default MySQL port.

Use iptables to restrict access to the MySQL port.

Set strong passwords and bind accounts to specific IPs.

Secure the root account with a strong password and local‑only login.

Enable binary and slow query logs.

Set proper permissions on MySQL installation and data directories.

Remove unused MySQL accounts and databases (e.g., the default test database).

7. MySQL master‑slave replication principle and configuration

Replication involves three steps: master writes changes to binary log, slave copies binary log to relay log, and slave replays relay log to apply changes.

Key process:

Slave I/O thread requests binlog events from master.

Master sends requested events along with binlog file name and position.

Slave writes events to its relay log and records master file/position.

Slave SQL thread parses relay log and executes the statements, keeping data synchronized.

Advantages of master‑slave replication:

Quick failover to slave if master fails.

Offload read queries to slaves, reducing master load.

Perform backups on slaves without impacting the master.

8. Adding a MySQL user with limited privileges

GRANT SELECT,INSERT,UPDATE,DELETE ON book.* TO 'test2'@'localhost' IDENTIFIED BY 'abc';

9. Display all directories under /test

ls -d */
find . -type d -maxdepth 1
ls -F | grep '/$'
ls -l | grep '^d' | awk '{print $9}'

10. Compress all files in /etc/a except b into /home/a/a.gz

tar --exclude=/etc/a/b -zPcvf /home/a/a.gz /etc/a

11. Give a script execution permission chmod +x script.sh 12. Meaning of umask 022

Default permissions are calculated as base (777 for directories, 666 for files) minus the umask. With umask 022, new directories get 755 (rwxr-xr-x) and new files get 644 (rw-r--r--).

13. View all files opened by a process

# Get PID of the process (e.g., crond)
pid=$(ps -ef | grep crond | grep -v grep | awk '{print $2}')
# List opened files
lsof -p $pid

14. Capture HTTP traffic on eth0 tcpdump -i eth0 port 80 15. Delete all files and directories under /a/b rm -rf /a/b/* 16. Common network management tools

Windows: ipconfig, ping, tracert, nslookup, etc.

Linux: ifconfig, ping, traceroute, dig, nslookup, etc.

17. Ports for common services

FTP: 20, 21

HTTPS: 443

SMTP: 25

POP3: 110

SSH: 22

18. Enable 3‑4 GB memory on Windows Server 2003/2008

Add /PAE to the end of the Boot.ini line and reboot.

19. iptables rule to allow 80 TCP from 192.168.1.2

iptables -A INPUT -p tcp -s 192.168.1.2 --dport 80 -j ACCEPT

20. Shell script to create group "class" and users std01‑std30

#!/bin/bash
groupadd class
for i in {01..30}; do
  useradd -G class std$i
done

21. Show all MySQL connections SHOW FULL PROCESSLIST; 22. Delete old MySQL binary logs

# In my.cnf
expire-logs-days=7
# Or manually
PURGE BINARY LOGS BEFORE '2022-01-01';
PURGE BINARY LOGS TO 'mysql-bin.000003';

These questions and answers provide a practical reference for candidates preparing for Linux operations and cloud computing engineer interviews.

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.

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