Master Essential Linux Administration: 20+ Key Topics and Practical Answers
This guide provides concise explanations and step‑by‑step instructions for fundamental Linux administration topics, covering licensing, OS selection, startup services, system optimization, runlevels, boot process, links, partitioning, file deletion, VI usage, user management, regex, sed, crontab, important directories, shutdown commands, sudoers, permission hierarchy, SecureCRT shortcuts, audit solutions, network troubleshooting, quoting rules, startup config files, log locations, IP address extraction, and a curated list of essential Linux commands.
1. Explain what GPL, GNU, and free software are. GPL (General Public License) grants anyone the right to obtain, modify, and redistribute free software. GNU (GNU's Not Unix) aims to create a completely free, open operating system. Free software can be used, copied, studied, modified, and distributed without restriction; major licenses include GPL and BSD.
2. How to choose a Linux distribution? Desktop users typically choose Ubuntu; server users prefer RHEL or CentOS, with CentOS being the most common. For higher security, choose Debian or FreeBSD. For advanced database or email services, choose SUSE. For testing new features, choose Fedora (a pre‑release of RHEL/CentOS). Most internet companies use CentOS 6 series.
3. Recommended startup services for beginners. Enable crond, iptables (if external IP), network, sshd, rsyslog, and sysstat to monitor performance.
4. Twelve steps for Linux system optimization. ① Use sudo instead of root login. ② Disable root SSH access. ③ Enable time synchronization. ④ Configure domestic yum mirrors. ⑤ Disable SELinux and iptables (unless WAN IP). ⑥ Increase file descriptor limits. ⑦ Clean /var/spool/clientmqueue regularly. ⑧ Trim unnecessary startup services. ⑨ Optimize kernel parameters via /etc/sysctl.conf. ⑩ Use English locale to avoid garbled characters. ⑪ Lock critical system files with chattr +. ⑫ Clear /etc/issue to hide version info.
5. Linux runlevels 0‑6 meanings. 0: halt, 1: single‑user (root password recovery), 2: multi‑user without network, 3: multi‑user with network (text mode), 4: reserved, 5: multi‑user with X‑Windows, 6: reboot.
6. Boot process from power‑on to login screen. BIOS self‑test → load hard disk → read MBR → GRUB menu → load kernel → start init → execute rc.sysinit → run level scripts → execute /etc/rc.d/rc.local → start mingetty for login.
7. Difference between hard links and symbolic links. Hard links share the same inode as the source file; symbolic links have a different inode and store the path to the source. Hard links cannot be created for directories, while symbolic links can. Deleting a symbolic link does not affect the source; deleting a hard link reduces the link count, and the file is removed only when the count reaches zero.
8. Reasonable partition planning for production servers. Provide simple, easy‑to‑manage schemes based on server role: single‑machine servers, load balancers, database servers, storage servers, shared‑storage servers, monitoring servers, etc., with suggested sizes for /boot, swap, /, /var, /data and appropriate RAID levels.
9. Principle of file deletion in Linux. A file is removed only when its link count reaches zero and no process holds it open; the kernel tracks i_count (open handles) and i_nlink (hard links).
10. Basic usage of the vi editor. vi has three modes: normal, insert, and command. Normal mode interprets keys as commands; insert mode records text; command mode (accessed with :) allows searching, replacing, showing line numbers, saving, and quitting.
11. Common user‑management commands. Group commands: groupadd, groupdel, groupmod, groups, grpck, grpconv, grpunconv. User commands: useradd, adduser, passwd, usermod, pwconv, pwck, pwunconv, finger, id, chfn, su.
12. Advanced grep options. -v exclude matches, -e enable extended regex, -i ignore case, -o output only matches, --color=auto highlight, -n show line numbers; special characters: ^, $, ., *, .*, character classes, quantifiers {n,m}.
13. Advanced sed options. -n suppress automatic printing, -p print, -d delete, -e allow multiple edits; use address ranges and capture groups (up to nine) for complex substitutions.
14. Commands to view online users. w, who, last, lastlog, whoami, finger, id.
15. Crontab purpose, syntax, and best practices. Schedule commands or scripts at fixed intervals. Syntax: minute hour day month weekday command. Use comments, place commands in scripts, specify full paths, prepend /bin/sh, redirect output to /dev/null, and follow redirection rules.
16. Important Linux directories and their contents. /usr (binaries, libraries, docs), /var (runtime files, logs), /home (user homes), /proc (virtual kernel info), /bin, /sbin, /etc, /root, /dev, /lib, /boot, /opt, /tmp, /lost+found, /media, /cd-rom, plus detailed sub‑directories under /usr and /proc.
17. Commands to shut down or reboot a server. shutdown (with -r, -h, -k, -t), halt (calls shutdown -h), reboot (similar to halt), init 0 (halt) and init 6 (reboot).
18. sudoers file editing considerations. Alias names must be uppercase; members separated by commas; user groups prefixed with %, command paths must be absolute, use NOPASSWD for password‑less execution, prefix prohibited commands with !, and continue lines with backslashes.
19. Implementing fine‑grained permission management. Define minimal required permissions, assign groups, configure sudoers, use whitelist approach, test configurations, document procedures, and communicate changes.
20. SecureCRT shortcut keys. Ctrl+a (beginning of line), Ctrl+c (interrupt), Ctrl+d (exit), Ctrl+e (end of line), Ctrl+l (clear screen), Ctrl+u (cut before cursor), Ctrl+k (cut after cursor), Ctrl+r (search history), Tab (completion), Ctrl+Shift+c/v (copy/paste), Ctrl+q (unlock), Ctrl+s (lock).
21. Five solutions for server account audit. Syslog environment variable, sudo + syslog, modified bash monitor, commercial bastion host, and other third‑party tools.
22. Troubleshooting a workstation that cannot access the Internet. Verify physical link, check IP/routing/DNS settings, test web service via telnet, ping gateway, ping upstream routers, ping external IPs, test DNS resolution, and involve network admin if needed.
23. Differences among single quotes, double quotes, and no quotes in Bash. Single quotes preserve literal text, double quotes allow variable/command expansion, and unquoted strings are split on whitespace and also allow expansion.
24. Important startup configuration files execution order. /etc/environment → /etc/profile → (~/.bash_profile | ~/.bash_login | ~/.profile) → ~/.bashrc → /etc/bashrc → ~/.bash_logout, each setting environment variables, aliases, and shell behavior.
25. Purpose of common system paths. /var/log/messages (system log), /var/log/secure (security log), /var/spool/clientmqueue (mail queue), /proc/interrupts (interrupt report), /etc/fstab (auto‑mount config), /etc/profile (environment variables).
26. Commands to obtain eth0 IP and broadcast address using cut, awk, grep, sed. Provide eight example pipelines combining grep with cut, awk (default and multi‑delimiter), sed with awk, and other variations.
27. Twenty useful Linux commands and their functions. cp, mv, mkdir, touch, cd, cat, ls, rm, find, alias, unalias, seq, head, tail, sed, pwd, rmdir, echo, xargs, tree, rpm, uname, hostname, whoami, useradd, passwd, su.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
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.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
