Follow this Linux learning roadmap from beginner to expert, covering key topics like commands, scripting, security, automation, networking, and project practice.

Linux is an open-source operating system powering servers, desktops, embedded devices, and cloud infrastructure globally. It underpins Android, most supercomputers, and much of the modern internet—making it a foundational skill for IT, DevOps, cybersecurity, data, and cloud roles. A structured Linux learning roadmap from beginner to expert helps you move from core Linux commands and Linux terminal basics to system administration, security, and containers without gaps. As outlined in Coursera’s Linux career guidance, Linux skills connect directly to roles in administration, security, and DevOps, which are in high demand.
Hands-on practice is safest in an isolated environment. Start with VirtualBox or VMware for a full virtual machine, Docker for lightweight containers, or Windows Subsystem for Linux (WSL) if you’re on Windows. Live USBs from Ubuntu or Fedora let you try Linux without changing your disk, and hosted cloud labs offer anywhere access.
Compare your options:
Virtual machine (VM): Closest to production, snapshots for rollback; requires more CPU/RAM.
Live USB: No install, zero risk; changes don’t persist unless configured with persistence.
WSL (Windows): Fast startup, integrates with Windows tools; limited to user space (no full kernel modules without WSL2).
Hosted cloud lab: Realistic networks and scale; may have time or cost limits.
Build confidence with core Linux commands for navigation and file manipulation in Linux. Remember the Unix philosophy: everything in Linux is a file—devices, processes, and configuration all surface as files. Practice these core Linux commands daily to accelerate fluency.
| Command | Purpose | Example |
|---|---|---|
| pwd | Show current directory | pwd |
| ls | List files | ls -la /etc |
| cd | Change directory | cd /var/log |
| cat | View file contents | cat /etc/os-release |
| less | Page through text | less /var/log/syslog |
| echo | Print text/variables | echo $HOME |
| cp | Copy files/dirs | cp file.txt /tmp/ |
| mv | Move/rename | mv app.log old.log |
| rm | Remove | rm -rf /tmp/testdir |
| mkdir | Create directory | mkdir -p ~/projects/demo |
| touch | Create/modify files | touch notes.txt |
| head/tail | Start/end of file | tail -f /var/log/auth.log |
| grep | Search text | grep -i error app.log |
| find | Discover files | find /etc -name "*.conf" |
| man | Command help | man systemctl |
Knowing where things live speeds up troubleshooting and safe changes.
| Directory | What it’s for | Typical contents |
|---|---|---|
| / | Root of the filesystem | Top-level directories |
| /home | User data | /home/alex, /home/dev |
| /etc | System configuration | /etc/ssh/sshd_config |
| /var | Variable data | Logs, caches, queues |
| /tmp | Temporary files | Ephemeral runtime data |
| /usr | User utilities | Binaries, libraries, docs |
| /bin, /sbin | Essential binaries | ls, cp, ip, systemd |
| /opt | Optional software | Third-party apps |
| /dev | Device files | /dev/sda, /dev/null |
| /proc, /sys | Kernel interfaces | Process and system info |
| /boot | Bootloader, kernels | vmlinuz, initramfs |
Bash scripting enables automating sequences of commands and handling errors efficiently. Start with variables, conditionals, loops, and exit codes; then add error handling and logging. Bash and Zsh are the most common interactive shells; both support robust scripting conventions.
Example 1: Hello, variables, and conditionals
#!/usr/bin/env bash
set -euo pipefail
NAME=${1:-"Linux Learner"}
HOUR=$(date +%H)
if (( HOUR < 12 )); then GREETING="Good morning"; else GREETING="Hello"; fi
echo "$GREETING, $NAME!"Example 2: Simple loop with error handling
#!/usr/bin/env bash
set -euo pipefail
trap 'echo "Error on line $LINENO"; exit 1' ERR
for f in *.log; do
gzip -9 "$f"
done
User and Group Management Fundamentals
Linux uses user IDs (UIDs) and group IDs (GIDs) to control access. Typical workflow: create a user, assign groups, set a secure password, and test permissions.
Create/modify/delete: useradd, usermod, userdel; groupadd, groupdel
Ownership/permissions: chown user:group file; chmod 640 file; umask for defaults
Check: id username, getent passwd, groups username
Example:
Add user and group: groupadd devops; useradd -m -G devops -s /bin/bash alice
Set password: passwd alice
Test: sudo -u alice touch /tmp/test; ls -l /tmp/test
A process is an instance of a running program. Learn to list, inspect, prioritize, and terminate processes to maintain responsive systems.
| Tool | What it shows | Typical usage |
|---|---|---|
| ps, pgrep | Snapshot of processes | ps aux |
| top/htop | Live CPU/mem view | top |
| nice/renice | Adjust priority | renice 10 -p 1234 |
| kill/killall | Send signals | kill -TERM 1234; killall nginx |
| bg/fg/nohup | Job control | myjob &; fg %1; nohup cmd & |
| free/vmstat | Memory stats | free -h; vmstat 1 |
| iostat | I/O throughput | iostat -xz 1 |
| df/du | Disk usage | df -h; du -sh /var/log/* |
Understand your distro’s package manager to install, update, and remove software safely.
Debian/Ubuntu: apt with dpkg under the hood
Update indexes: sudo apt update
Upgrade: sudo apt upgrade
Search/install/remove: apt search htop; sudo apt install htop; sudo apt remove htop
RHEL/CentOS/Fedora: dnf or yum with rpm
Update: sudo dnf upgrade
Search/install/remove: dnf search htop; sudo dnf install htop; sudo dnf remove htop
Use trusted repositories, enable security updates, and keep kernels and critical services current.
A filesystem organizes data on disk for retrieval and storage. Linux supports ext4, XFS, ZFS, and others.
Inspect: lsblk, blkid, fdisk -l
Space and usage: df -h, du -sh /path
Format/mount: mkfs.ext4 /dev/sdb1; mount /dev/sdb1 /mnt/data; umount /mnt/data
Health and growth: fsck, resize2fs (ext), xfs_growfs (XFS), zpool/zfs (ZFS)
Consider snapshots and send/receive with ZFS for robust backups (see the ZFS on Linux course on Coursera).
systemd is the system and service manager in modern Linux distributions, responsible for booting and controlling system units.
Service control: systemctl start|stop|restart|status nginx
Enable on boot: systemctl enable nginx; systemctl is-enabled nginx
Logs: journalctl -u nginx --since "1 hour ago"
Example unit file (/etc/systemd/system/myapp.service):
[Unit]
Description=My App
After=network.target
[Service]
ExecStart=/usr/local/bin/myapp
Restart=on-failure
[Install]
WantedBy=multi-user.targetEnable and start: systemctl enable --now myapp
Know your interfaces, routes, and connectivity.
Interfaces and IPs: ip addr, ip link
Routes: ip route
Connectivity: ping host, traceroute host
Ports and sockets: ss -tulpn
Name resolution: dig example.com, getent hosts example.com
Remote access: ssh user@host; copy files with scp or rsync -e ssh
Try SSH into a VM you control to build real admin muscle memory.
Move from ad hoc scripts to scheduled, reliable automation.
Schedule with cron: crontab -e; example: 0 2 * * * /usr/local/bin/backup.sh
Common tasks: rsync snapshots, daily package updates, log rotation, report generation
Useful CLI tools: rsync, curl, jq, tar, zip/unzip, parallel
Git is a distributed version control system for tracking code, configuration, and documents.
Workflow: git init; git clone URL; git add; git commit -m "msg"; git push; git pull; git branch; git merge
Good habits: frequent commits, meaningful messages, branches and pull requests on GitHub/GitLab
tmux is a terminal multiplexer that lets you manage multiple sessions, windows, and panes in one terminal—perfect for persistent remote work.
Text utilities: grep (search), sed (stream edits), awk (pattern scanning/fields)
Editors: Vim, Nano, and VS Code (via Remote SSH)
Quick wins: tmux new -s work; grep -R "ERROR" /var/log; sed -n '1,100p' file; awk -F: '{print $1}' /etc/passwd
A container packages an application and its dependencies to ensure consistency across environments.
Run: docker run --rm -it ubuntu:22.04 bash
Build: docker build -t myapp:1.0 .
Share: docker push myrepo/myapp:1.0
Benefits: fast provisioning, sandboxing, reproducibility, and simplified CI/CD pipelines.
Kubernetes automates deployment, scaling, and management of containerized applications.
Try locally: minikube start; kubectl apply -f deploy.yaml
Core objects: Pods (runtime units), Services (network access), Deployments (stateless rollout), ConfigMaps/Secrets (config)
Inspect: kubectl get pods -A; kubectl logs deploy/myapp
Linux 是一种开源操作系统,为全球服务器、台式机、嵌入式设备和云基础设施提供动力。它是 Android、大多数超级计算机和大部分现代互联网的基础,这就是为什么 Linux 技能可以直接映射到 IT、DevOps、网络安全、数据和云计算领域的紧缺职位。
路线图重点介绍了用于导航和文件操作的终端基础知识的日常练习,包括:pwd、ls、cd、cat、less、echo、cp、mv、rm、mkdir、touch、head/tail、grep、find 和 man。这些内容为以后在 The Linux Foundation 中高效工作和排除故障打下了基础。
路线图指出,Unix 的理念是 "一切皆文件",这意味着设备、进程和配置都是通过类似文件的接口公开的。这一点很重要,因为它使 Linux 保持一致:一旦你知道如何检查和操作文件,你就可以用同样的思维方式来理解系统行为、配置和诊断。
对于那些与服务器、基础设施和安全工作密切相关的职位来说,Linux 尤其有价值。路线图强调 Linux 是 IT、DevOps、网络安全、数据和云计算职业的一项基础技能,尤其是侧重于系统管理、安全和 DevOps 的职位,因为 Linux 通常用于这些职位的生产环境。
Writer
Coursera is the global online learning platform that offers anyone, anywhere access to online course...
此内容仅供参考。建议学生多做研究,确保所追求的课程和其他证书符合他们的个人、专业和财务目标。