Master Linux: From OS Basics to Command-Line Power Tools
This comprehensive guide covers Linux operating system fundamentals, installation steps, filesystem hierarchy, essential command-line utilities, user and group management, permission handling, process control, and software installation methods, providing practical examples and clear explanations for beginners and developers alike.
Operating System Overview
An operating system (OS) is the fundamental software that manages hardware and software resources, running directly on the hardware and enabling other software to operate.
Linux OS Installation
https://blog.csdn.net/huaijiu123/article/details/82083452
Linux Filesystem
/var: Stores variable data such as logs, spools, and temporary files. /home: Contains user files and personal settings; a directory is created for each user. /proc: Virtual files representing kernel and process information, not stored on disk. /bin: Essential binary executables required for system boot. /etc: Configuration files for the system and services. /root: Home directory of the root (superuser). /dev: Device files that abstract hardware as files.
Linux Command Operations
Show current directory: pwd Change directory: cd [directory], cd ~ (home), cd .. (parent), cd - (previous), cd / (root)
List files: ls, ls -l (detailed), ls -a (including hidden), ls -la (both)
Create directories: mkdir folder, mkdir -p path/to/folder Remove directories: rmdir folder, rmdir -p folder Delete files/directories: rm -rf target (force), rm -ri target (interactive)
Copy files/directories: cp source target, cp -r dir1 dir2, cp -ri dir1 dir2 Move/rename: mv old new Create empty file: touch filename Edit files: vi filename View file content: cat filename, cat > filename Show file start: head filename, head -n N filename Show file end: tail filename, tail -f filename,
tail -n N filenameLinux Permission Management
Linux defines read ( r), write ( w), and execute ( x) permissions for owner, group, and others. Use ls -l to view them. drwxr-xr-x 2 root root 4096 Sep 23 2011 bin Permission bits are represented as: 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 are supported:
Symbolic mode: chmod u=rwx,g=rw,o=rw file Numeric mode: chmod 753 file (owner 7=rwx, group 5=r-x, others 3=-wx)
Linux Process Management
View running processes with ps and filter with grep: ps -ef | grep process_name Terminate a process using kill -9 PID.
Common Linux Commands
clear: clear the terminal screen man: view command manual pages mnt: mount filesystems
SSH service control: service sshd start, service sshd restart, service sshd stop Run a Java JAR in background:
nohup java -jar jar-0.0.1-SNAPSHOT.jar &Linux System Software Installation
Three 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; install, query, or remove packages (e.g., rpm -ivh package.rpm, rpm -qa | grep name, rpm -e package)
yum : Front‑end to rpm that resolves dependencies 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.
Open Source Linux
Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.
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.
