Linux Operating System Overview, Installation, Filesystem, Commands, User Management, and Permissions
This article provides a comprehensive guide to Linux fundamentals, covering OS concepts, installation steps, filesystem hierarchy, essential command-line tools, user and group management, permission handling, process control, and common software installation methods.
Operating System Overview
Operating System (OS) is a type of software that manages and controls computer hardware and software resources, running directly on the bare machine and providing the essential platform for all other applications.
Linux Operating System Installation
Installation instructions are available in the linked article: Linux Installation Tutorial .
Linux Filesystem
The main directories are: /var: variable files such as logs, spool files, lock files, temporary files, and page cache. /home: user home directories containing personal files, configuration, documents, caches, etc. /proc: virtual files that represent kernel and process information; they do not occupy disk space. /bin: essential binary executables needed for system boot, usable by all users. /etc: system configuration files (firewall, startup scripts, etc.). /root: home directory of the superuser (root). /dev: device files; Linux treats devices as files for easy I/O.
Linux Command Operations
Common commands include:
Show current directory: pwd Change directory: cd (e.g., cd [dir], cd ~, cd .., cd -, cd /)
List files: ls (options: ls -l, ls -a, ls -la)
Create directories: mkdir (e.g., mkdir folder, mkdir -p a/b/c)
Remove directories: rmdir (e.g., rmdir folder, rmdir -p folder)
Delete files or directories: rm (e.g., rm -rf folder, rm -ri folder)
Copy files/directories: cp (e.g., cp -r src dst, cp -ri src dst)
Move/rename: mv (e.g., mv old new)
Create empty file: touch filename Edit files: vi filename – three modes: command, insert, and last‑line mode.
Display file content: cat filename or cat > filename to create.
Show file head: head -n N filename Show file tail: tail filename or tail -f filename for live logs.
Because rm -rf can be dangerous, its use is generally discouraged.
Linux Permission Management
Linux defines read ( r), write ( w) and execute ( x) permissions for owner, group and others. Use chmod to modify them.
Permission syntax examples: chmod -r u=rwx,g=rw,o=rw f01 Numeric mode examples:
chmod 753 f01 # rwx for owner, r-x for group, --x for others chmod 777 f01 # full permissions for everyoneLinux Process Management
View processes with ps (e.g., ps -ef | grep sshd) and terminate them with kill -9 PID.
Other Common Commands
clear– clear the terminal. man – view command manual. mnt – mount filesystems.
SSH service control: service sshd start, service sshd restart, service sshd stop.
Run a JAR in background: nohup java -jar jar-0.0.1-SNAPSHOT.jar &.
Linux System Software Installation
Three main 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 -qa | grep pkg, rpm -ivh package.rpm, rpm -e package).
yum – resolves dependencies automatically and installs RPMs from repositories.
User and Group Management
Each user has a unique UID; each group has a GID. The root user has the highest privileges. Commands:
Switch user: su username or su - username Current user: whoami Groups of current user: groups Show UID/GID: id Add user: useradd username (optionally useradd -u UID username)
Set password: passwd username Delete user: userdel username or userdel -r username Modify user: usermod -l newname oldname, usermod -g groupname username Add group: groupadd groupname (optionally groupadd -g GID groupname)
Linux Permission Operations
Change permissions with chmod. Symbolic mode uses u, g, o and + / - with r, w, x. Numeric mode uses octal numbers (e.g., chmod 753 file).
Images
Relevant diagrams are included in the original source (e.g., vi editor modes, permission bits, process listings).
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.
Architecture Digest
Focusing on Java backend development, covering application architecture from top-tier internet companies (high availability, high performance, high stability), big data, machine learning, Java architecture, and other popular fields.
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.
