Master Linux: Essential OS Concepts, Commands, and Permissions Explained
This guide provides a comprehensive overview of Linux operating systems, covering core concepts such as file system hierarchy, essential commands for navigation, file manipulation, user and group management, permission settings, process control, and software installation methods.
Operating System Overview
Operating System (OS) is a basic system software that manages and controls computer hardware and software resources, running directly on bare metal; all other software requires OS support.
Linux File System
/var: files changed during normal operation, spooling, logs, lock files, temporary files, page cache, etc. /home: user files, configuration, documents, data, mail, cache; each user gets a directory under /home. /proc: virtual files representing kernel and process information, not stored on disk. /bin: essential binary executables needed at system startup, usable by all users. /etc: system configuration files (firewall, startup scripts, etc.). /root: home directory of the root (superuser). /dev: device files, abstracting hardware as files.
Common Linux Commands
pwd : display current directory.
cd : change directory (e.g., cd /path, cd ~, cd .., cd -).
ls : list directory contents ( ls -l, ls -a, ls -la).
mkdir : create directories ( mkdir dir, mkdir -p dir/subdir).
rmdir : remove empty directories ( rmdir dir, rmdir -p dir).
rm : delete files or directories ( rm -rf path, rm -ri path).
cp : copy files or directories ( cp src dest, cp -r src dest, cp -ri src dest).
mv : move or rename files ( mv old new).
touch : create an empty file ( touch filename).
vi : powerful text editor with command, insert, and last-line modes.
cat : display file content or create a new file ( cat file, cat > file).
head : show the beginning of a file ( head -n N file).
tail : show the end of a file or follow updates ( tail -f file, tail -n N file).
chmod : change file permissions using symbolic or numeric modes.
User and Group Management
Each user has a unique UID; each group has a GID. The root user (UID 0) has all privileges. Adding a user creates a corresponding group by default.
su : switch user ( su username or su - username).
whoami : display current user.
groups : list groups of current user.
id : show UID and GID.
useradd : add a new user ( useradd name, useradd -u UID name).
passwd : change user password.
userdel : delete a user ( userdel name, userdel -r name).
usermod : modify user information ( usermod -l new old, usermod -g group name).
groupadd : create a new group ( groupadd group, groupadd -g GID group).
Permission Operations
Linux defines read (r), write (w), and execute (x) permissions for owner, group, and others. Use ls -l to view. drwxr-x-x. 2 root root 4096 Sep 23 2011 bin Permission bits can be set symbolically ( chmod u+rwx,g+rw,o+rw file) or numerically ( chmod 753 file, chmod 777 file).
Process Management
ps : view running processes ( ps -ef | grep keyword).
kill : terminate a process ( kill -9 PID).
Other Useful Commands
clear: clear the terminal. man: view command manual. mnt: mount filesystems. service sshd start|restart|stop: manage SSH service. nohup java -jar app.jar &: run a Java JAR in background.
Software Installation
Common methods: tar (extract archives), rpm (Red Hat package manager), yum (automated rpm installation). tar -zxvf file.tar.gz, tar -jxvf file.tar.bz2, tar -xvf file.tar. rpm -ivh package.rpm, rpm -qa | grep name, rpm -e package. yum install package (automatically resolves dependencies).
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.
Ops Community
A leading IT operations community where professionals share and grow together.
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.
