Master Linux Basics: Filesystem, Commands, Users, and Permissions Explained
This guide provides a comprehensive overview of Linux operating systems, covering installation, filesystem hierarchy, essential command-line tools, user and group management, permission settings, process control, and common software installation methods, offering practical examples and code snippets for each topic.
Operating System Overview
Operating System (OS) is software that manages and controls computer hardware and software resources, running directly on the bare machine. All other software requires the OS to operate.
Linux OS Installation
For Linux installation, see the tutorial at https://blog.csdn.net/huaijiu123/article/details/82083452
Linux Filesystem
/var: files changed during normal operation, spool files, log files, lock files, temporary files, and page‑formatted files. /home: user files such as configuration, personal data, mail, and cache. A separate directory is created for each user. /proc: virtual files that exist only in memory; they provide process and system information. /bin: essential executable binaries needed at system startup, usable by regular users. /etc: system configuration files (firewall, startup scripts, etc.). /root: home directory of the root (super‑user) account. /dev: device directory; devices are represented as files, allowing uniform read/write access.
Linux Command Operations
Show current directory: pwd Change directory: cd (e.g., cd /path, cd ~, cd .., cd -)
List files: ls (options: ls -l, ls -a, ls -la)
Create directory: mkdir (e.g., mkdir folder, mkdir -p dir1/dir2/dir3)
Remove directory: rmdir (e.g., rmdir folder, rmdir -p folder)
Delete files or directories: rm (e.g., rm -rf path, rm -ri path)
Copy files or directories: cp (e.g., cp -r src dest, cp -ri src dest)
Move/rename: mv (e.g., mv old new)
Create empty file: touch filename Edit file: vi filename View file content: cat filename Show file head: head -n filename Show file tail: tail filename (or tail -f filename for live logs)
Linux Permissions
Linux defines three permissions: read (r), write (w), and execute (x). Use ls -l to view permissions. Example permission string:
drwxr-xr-x 2 root root 4096 Sep 23 2011 bin d: directory rwx: owner has read, write, execute r-x: group has read and execute r-x: others have read and execute
Change permissions with chmod. Two modes:
Symbolic mode: use u/g/o and +/‑ with r/w/x (e.g., chmod u+rwx,g+rw,o+r file)
Numeric mode: use three octal digits (e.g., chmod 753 file, chmod 777 file)
Linux Process Management
View processes with ps (e.g., ps -ef | grep keyword) and kill them with kill -9 PID.
Linux System Software Installation
Common installation methods:
tar : extract source packages ( tar -zxvf file.tar.gz, tar -jxvf file.tar.bz2, tar -xvf file.tar)
rpm : Red Hat package manager ( rpm -ivh package.rpm, rpm -qa | grep name, rpm -e package)
yum : resolves dependencies and installs rpm packages automatically.
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.
