محاضرة 10
Linux Mega Revision & Final Review
مراجعة ميجا نهائية شاملة للمنهج بالكامل، من أساسيات الـ CLI وحتى الـ LVM والعمليات.
يلا نشوف الملخص
Linux Mega Revision & Final Exam Guide
This guide is a consolidated summary of everything covered in the Linux course (Lectures 1-9), designed to prepare you for the final exam.
1. Fundamentals & Architecture
- Operating System: Manages hardware and software layers.
- Layers: Hardware ↔ Kernel ↔ GNU/Shell ↔ Applications.
- Kernel: Core of the OS. Manages CPU, RAM, and HW connections.
- Distributions (Distros): Kernel + Tools + Desktop + Package Manager. Examples: Ubuntu, Fedora, RedHat.
- Advantages: Stability, Security, Open Source, and Power.
2. Interface (GUI & CLI)
- Desktop: Activities, Top Bar, Dash (Side Bar), System Menu.
- User Types:
- Normal: Limited permissions.
- Privileged: Uses
sudofor administrative tasks. - Root: The ultimate administrator (UID 0).
- CLI Essentials:
whoami: Current user.pwd: Current directory path.ls: List files (-ldetails,-ahidden).cd: Navigate folders.clear: Clean terminal screen.
3. File & Directory Management
- Creation:
mkdir(folders),touch(empty files). - Manipulation:
cp(copy),mv(move/rename),rm(delete),rmdir(delete empty folders). - Editing:
nano(save: Ctrl+O, exit: Ctrl+X),echo(>overrides,>>appends). - Viewing Content:
cat: Show full file.less: Scrollable view.head/tail: Start/end of file.tail -f: Follow file updates in real-time.
4. Advanced Search & Sorting
find . -name "*.js": Search for file names.grep "word" file.txt: Search for text inside files.sort: Alphabetical order (-rreverse,-uunique).wc -l: Count number of lines in a file.
5. User & Group Administration
- User Commands:
useradd -m,passwd,userdel -r. - Group Commands:
groupadd,groupdel,usermod -aG,gpasswd -d. - System Files:
/etc/passwd(users),/etc/group(groups),/etc/shadow(passwords).
6. Security & Permissions (chmod)
- Permission String:
d | rwx | r-x | r--(Type | User | Group | Other). - Types:
-(file),d(directory). - Numeric Mode: Read(4), Write(2), Execute(1).
755: rwxr-xr-x (Common for programs).644: rw-r--r-- (Common for files).600: rw------- (Private file).
7. Disk & Storage Management
- Partitioning (fdisk):
fdisk /dev/sdb(Commands:n,p,w,q). - FHS (Filesystem Hierarchy):
/bin: Basic commands./sbin: System commands (admin)./etc: Config files./home: User data./dev: Hardware devices.
- LVM (Logical Volume Management):
- Flexible storage management (PV ➔ VG ➔ LV).
pvcreate➔vgcreate➔lvcreate➔mkfs➔mount.
🚀 Final Exam Tips:
- Permissions Calculation: Practice converting
rwxto numeric and vice versa (e.g., 755, 644, 700). - Pathing: Understand the difference between Root
/and Home~. - Basic Commands: Ensure you know the difference between
rmandrmdir, and>vs>>. - LVM Sequence: Remember the order of creating LVM (PV -> VG -> LV).
- Processes: Know how to identify a PID using
topand terminate it usingkill.
في نقطة مش واضحة؟ بطبط موجود!
اسأل بطبط عنها