Panduan komprehensif 17 volume dari fundamental Linux hingga server administration. Setiap command dan script dilengkapi penjelasan detail per parameter. Dari install Debian hingga troubleshooting, semua dibahas tuntas dengan contoh praktis.
VOLUMES17
BAB50+
BACA20+ JAM
OSDebian 12
ABDUR ROZAK, S.Kom.
Web Developer & System Administrator - abdurrozak.my.id
ABDURROZAK.MY.ID // DAFTAR VOLUME
17 VOLUME SERI LENGKAP
Pilih volume untuk mulai belajar
VOLUME 01
LINUX & DEBIAN FUNDAMENTALS
Sejarah Linux, filosofi, arsitektur kernel, dan mengapa Debian.
FONDASI
VOLUME 02
INSTALLING DEBIAN SERVER
Netinstall, partisi, konfigurasi dasar pasca-install.
INSTALL
VOLUME 03
COMMAND LINE ESSENTIALS
Navigasi, file, text processing, piping, redirection.
ps, top, systemctl, service management, unit files.
SERVICE
VOLUME 10
MONITORING & LOGS
top, htop, journalctl, log rotation, performance.
MONITOR
VOLUME 11
WEB SERVER FUNDAMENTALS
Apache, Nginx, virtual hosts, SSL/TLS, PHP-FPM.
WEB
VOLUME 12
DATABASE SERVER
MariaDB, PostgreSQL, backup, replication, tuning.
DATABASE
VOLUME 13
DNS & DHCP SERVER
BIND9, dnsmasq, isc-dhcp-server, forwarders.
INFRA
VOLUME 14
FILE SHARING SERVER
Samba (SMB/CIFS), NFS, WebDAV, permissions.
SHARE
VOLUME 15
SERVER SECURITY
UFW, fail2ban, AppArmor, hardening, audit.
SECURITY
VOLUME 16
BACKUP & RECOVERY
rsync, tar, borg, timeshift, disaster recovery.
BACKUP
VOLUME 17
TROUBLESHOOTING
Diagnostic, common issues, recovery, best practice.
DIAGNOSTIC
VOLUME 01 / 17
LINUX & DEBIAN FUNDAMENTALS
Fondasi semua server Linux. Memahami sejarah Linux, filosofi open source, arsitektur kernel, keluarga distro, dan mengapa Debian menjadi pilihan utama untuk server production.
SUB-BAB4LEVELFondasiWAKTU40 MENIT
1.1
VOLUME 01 FUNDAMENTAL
SEJARAH & FILOSOFI LINUX
Sejarah Singkat
Linux adalah kernel open-source yang diciptakan oleh Linus Torvalds pada tahun 1991 saat ia masih mahasiswa di Universitas Helsinki, Finlandia. Awalnya hanya hobi, Linux kini menjadi kernel yang menjalankan 96.3% server di dunia, 100% superkomputer tercepat, dan miliaran perangkat Android.
Linux dibangun di atas fondasi UNIX (diciptakan Bell Labs tahun 1969). Linus mengambil filosofi UNIX "do one thing and do it well" dan mengembangkannya dengan lisensi GPL (GNU Public License) yang menjamin kebebasan:
KEBEBASAN MENJALANKAN
Program bisa dijalankan untuk tujuan apa saja
KEBEBASAN MEMPELAJARI
Source code harus tersedia untuk dipelajari
KEBEBASAN MENDISTRIBUSI
Copy bisa dibagikan ke siapa saja
KEBEBASAN MEMODIFIKASI
Modifikasi bisa didistribusikan
Arsitektur Linux
LAYER
KOMPONEN
FUNGSI
Hardware
CPU, RAM, Disk, NIC
Physical resources
Kernel
Linux Kernel
Jembatan hardware-software, process management, memory, device driver
Shell
Bash, Zsh, Fish
Command interpreter, user interface CLI
System Libraries
glibc, coreutils
Fungsi standar untuk aplikasi
Applications
Apache, MySQL, Nginx
Software yang menjalankan tugas spesifik
Desktop Environment
GNOME, KDE (opsional)
GUI untuk desktop (server biasanya tanpa GUI)
KUNCI: Yang disebut "Linux" sebenarnya adalah kernel. Sistem operasi lengkap (Linux + GNU tools + aplikasi) sering disebut GNU/Linux. Tapi untuk kesederhanaan, kita tetap pakai istilah "Linux".
KOMPETENSI SUB-BAB 1.1
Memahami sejarah dan filosofi Linux
Menjelaskan 4 kebebasan GPL
Mengenal arsitektur Linux (hardware - kernel - shell - apps)
1.2
VOLUME 01 FUNDAMENTAL
KELUARGA DISTRO LINUX
Distro Keluarga Debian
Distro (distribusi) adalah paket lengkap Linux: kernel + tools + package manager + aplikasi. Ada ratusan distro, tapi semuanya berasal dari beberapa keluarga besar:
KELUARGA
PACKAGE MANAGER
CONTOH DISTRO
USE CASE
Debian
APT (apt, dpkg)
Debian, Ubuntu, Linux Mint, Kali
Server, desktop, security
Red Hat
RPM (dnf, yum)
RHEL, Fedora, CentOS, Rocky
Enterprise server
Arch
pacman
Arch, Manjaro, EndeavourOS
Advanced user, rolling release
SUSE
Zypper
openSUSE, SLES
Enterprise, desktop
Independent
Bervariasi
Slackware, Gentoo, Alpine
Specialized use case
Mengapa Debian untuk Server?
STABIL
Release cycle 2 tahun, testing ketat. Debian Stable adalah salah satu OS paling stabil di dunia.
AMAN
Tim security responsif, update keamanan cepat, default configuration aman.
PAKET LENGKAP
60,000+ package di repository resmi. Hampir semua software tersedia.
RINGAN
Bisa jalan di RAM 256MB. Minimal resource usage, cocok untuk VPS kecil.
KOMUNITAS BESAR
Dokumentasi lengkap, forum aktif, ribuan tutorial online.
100% GRATIS
Tidak ada biaya lisensi. Cocok untuk budget terbatas.
Debian Release Cycle
BRANCH
STATUS
UPDATE
USE CASE
Stable
Production-ready
Security & critical bug fixes only
Server production
Testing
Calon stable berikutnya
Regular updates
Pre-production testing
Unstable (Sid)
Rolling development
Daily updates
Developer, testing
Experimental
Bleeding edge
Very frequent
Package development
UNTUK SERVER: Selalu gunakan Debian Stable. Testing dan Unstable tidak disarankan untuk production karena bisa break sewaktu-waktu. Debian 12 "Bookworm" adalah stable saat ini.
User permission, SELinux/AppArmor, namespaces, cgroups.
Cek Informasi Kernel
BASH
# Lihat versi kernel yang sedang berjalanuname-r↳ -r = release, menampilkan versi kernel (contoh: 6.1.0-18-amd64)# Lihat semua informasi sistemuname-a↳ -a = all, menampilkan kernel name, nodename, release, version, machine# Output: Linux debian-server 6.1.0-18-amd64 #1 SMP ... x86_64 GNU/Linux# Lihat detail kernelcat /proc/version
↳ /proc/version berisi info lengkap tentang kernel yang sedang berjalan# Lihat kernel modules yang dimuatlsmod↳ Menampilkan daftar kernel modules (driver) yang sedang aktif# Lihat ring buffer kernel messagesdmesg | less↳ dmesg = display message, menampilkan log kernel (boot, hardware detection)↳ | less = pipe ke less agar bisa scroll# Cari pesan error di dmesgdmesg-T | grep-i error↳ -T = human-readable timestamp, grep -i = case-insensitive search
KOMPETENSI SUB-BAB 1.3
Memahami 6 fungsi utama kernel Linux
Mampu cek versi kernel dengan uname
Mampu melihat kernel messages dengan dmesg
1.4
VOLUME 01 FUNDAMENTAL
SHELL & BASH
Apa Itu Shell?
Shell adalah program yang menerima input dari user (command) dan menerjemahkannya untuk dijalankan oleh kernel. Shell adalah "juru bicara" antara user dan kernel.
SHELL
PATH
KARAKTERISTIK
bash
/bin/bash
Default di Debian, paling populer, scripting powerful
sh
/bin/sh
Bourne shell, symlink ke bash di Debian, POSIX-compliant
zsh
/bin/zsh
Default di macOS, auto-completion canggih
fish
/usr/bin/fish
User-friendly, syntax highlighting, tidak POSIX
dash
/bin/dash
Cepat, ringan, untuk system scripts
Cek Shell yang Dipakai
BASH
# Lihat shell yang sedang aktifecho$SHELL↳ $SHELL = environment variable yang menyimpan path shell default# Output: /bin/bash# Lihat shell saat ini (bisa berbeda dari default)echo$0↳ $0 = nama program yang sedang berjalan (shell saat ini)# Output: -bash# Lihat semua shell yang terinstallcat /etc/shells
↳ File /etc/shells berisi daftar shell valid di sistem# /bin/sh# /bin/bash# /usr/bin/bash# /bin/dash# Ganti shell default userchsh-s /bin/zsh
↳ chsh = change shell, -s = specify shell baru↳ Perlu logout & login agar perubahan berlaku# Lihat shell untuk user tertentugrep"^username" /etc/passwd
↳ Field terakhir di /etc/passwd adalah shell default user
Prompt Bash
Saat buka terminal, kamu melihat prompt seperti ini:
root@debian-server:~#
BAGIAN
ARTI
root
Username yang login
@
Pemisah
debian-server
Hostname server
:
Pemisah
~
Current directory (~ = home directory)
#
Root user (jika $ =普通 user)
PENTING:# = root (superuser), $ =普通 user. Selalu perhatikan prompt sebelum menjalankan command. Command berbahaya sebagai root bisa merusak sistem!
KOMPETENSI SUB-BAB 1.4
Memahami apa itu shell dan fungsinya
Mengenal berbagai jenis shell (bash, zsh, fish)
Mampu cek dan ganti shell default
Memahami struktur prompt bash
VOLUME 02 / 17
INSTALLING DEBIAN SERVER
Panduan lengkap install Debian Server dari netinstall ISO. Termasuk download ISO, pembuatan bootable USB, proses instalasi, partisi, konfigurasi dasar pasca-install, dan setup awal server.
SUB-BAB4LEVELInstallWAKTU60 MENIT
2.1
VOLUME 02 INSTALL
DOWNLOAD & PERSIAPAN ISO
Jenis ISO Debian
TIPE ISO
UKURAN
ISI
USE CASE
netinst
~400 MB
Minimal, download package via internet
Server (PALING DIREKOMENDASIKAN)
DVD-1
~3.7 GB
Desktop environment + banyak package
Desktop, offline install
BD-1
~50 GB
Semua package official
Offline install lengkap
live
~3 GB
Live system, bisa coba tanpa install
Testing, demo
UNTUK SERVER: Gunakan netinst. Kecil, cepat download, dan hanya install package yang dibutuhkan. Hemat bandwidth dan disk space.
Download Debian
OFFICIAL LINK
# Website resmi Debianhttps://www.debian.org/# Direct link Debian 12 (Bookworm) netinsthttps://cdimage.debian.org/debian-cd/current/amd64/iso-cd/# File yang didownload:# debian-12.5.0-amd64-netinst.iso# Verifikasi checksum (PENTING untuk keamanan!)sha256sum debian-12.5.0-amd64-netinst.iso
↳ Bandingkan output dengan SHA256SUMS di website↳ Jika match, ISO tidak rusak/tidak dimodifikasi# Atau gunakan SHA512 (lebih aman)sha512sum debian-12.5.0-amd64-netinst.iso
Buat Bootable USB
OS
TOOL
CARA
Windows
Rufus, Etcher
Download Rufus, pilih ISO, Write
Linux
dd, Etcher
dd if=file.iso of=/dev/sdX bs=4M
macOS
dd, Etcher
dd if=file.iso of=/dev/rdiskN bs=4m
Cross-platform
Balena Etcher
GUI sederhana, 3 klik selesai
LINUX - DD COMMAND
# Cek nama USB drive (HATI-HATI, jangan salah disk!)lsblk↳ Lihat daftar block device, cari USB (biasanya /dev/sdb atau /dev/sdc)# Unmount USB (jika auto-mounted)sudo umount /dev/sdb*
↳ Unmount semua partisi di USB# Write ISO ke USB (PERINGATAN: ini akan hapus semua data di USB!)sudo ddif=debian-12.5.0-amd64-netinst.iso of=/dev/sdb bs=4M status=progress
↳ if = input file (ISO)↳ of = output file (USB drive, BUKAN partisi! /dev/sdb bukan /dev/sdb1)↳ bs = block size 4MB (lebih cepat)↳ status=progress = tampilkan progress# Sync untuk memastikan semua data tertulissync
PERINGATAN: Command dd sangat powerful. Salah tulis of= bisa hapus data penting! Selalu double-check device name dengan lsblk.
KOMPETENSI SUB-BAB 2.1
Membedakan jenis ISO Debian (netinst, DVD, live)
Mampu download dan verifikasi checksum ISO
Mampu membuat bootable USB dengan Rufus/dd
2.2
VOLUME 02 INSTALL
PROSES INSTALASI
Langkah Instalasi
1
BOOT DARI USB
1. Colok USB ke server, nyalakan.
2. Masuk BIOS/UEFI (tekan F2/Del/F12 saat boot).
3. Set boot priority ke USB.
4. Pilih Graphical Install atau Install (text mode).
2
LANGUAGE, LOCATION, KEYBOARD
1. Language: English (direkomendasikan untuk server).
2. Location: Other → Asia → Indonesia.
3. Keyboard: English (US) atau sesuai preference.
3
NETWORK CONFIGURATION
1. Hostname: nama server (contoh: web-server, db-server).
2. Domain name: kosongkan jika tidak punya domain, atau isi domain lokal (contoh: local).
3. Network: pilih interface (eth0/ens33), pilih DHCP atau manual.
4
ROOT PASSWORD & USER
1. Root password: buat password kuat (12+ karakter, kombinasi).
2. Full name: nama user biasa (contoh: "Admin User").
3. Username: username untuk login (contoh: "admin").
4. Password: password user biasa.
5
PARTITIONING DISK
Pilih salah satu:
Guided - use entire disk (paling mudah, rekomended untuk pemula):
1. Pilih disk.
2. Pilih partitioning scheme:
SCHEME
PARTISI
USE CASE
All files in one partition
/ (root) + swap
Server sederhana
Separate /home partition
/ + /home + swap
Desktop, user data terpisah
Separate /home, /var, /tmp
/ + /home + /var + /tmp + swap
Server production (RECOMMENDED)
Manual (untuk advanced user):
Buat partisi manual sesuai kebutuhan. Contoh layout server:
PARTISI
SIZE
TYPE
MOUNT POINT
sda1
512 MB
EFI System
/boot/efi
sda2
1 GB
ext4
/boot
sda3
20 GB
ext4
/
sda4
20 GB
ext4
/var
sda5
10 GB
ext4
/tmp
sda6
Remaining
ext4
/home
sda7
2x RAM
swap
[swap]
6
PACKAGE SELECTION
Pilih software yang akan diinstall. Untuk server:
PACKAGE
REKOMENDASI
[ ] Debian desktop environment
❌ Uncheck (server tidak perlu GUI)
[ ] ... GNOME
❌ Uncheck
[✓] web server
✓ Check (jika butuh Apache/Nginx)
[✓] SSH server
✓ Check (WAJIB untuk remote access)
[ ] standard system utilities
✓ Check (basic tools)
7
GRUB BOOTLOADER
1. Install GRUB boot loader? → Yes.
2. Pilih device untuk install GRUB (biasanya /dev/sda).
3. Tunggu proses selesai.
4. Installation complete → Continue.
5. Cabut USB, reboot.
KOMPETENSI SUB-BAB 2.2
Mampu melakukan instalasi Debian dari awal sampai selesai
Memahami pilihan partisi untuk server
Mampu memilih package yang tepat untuk server
2.3
VOLUME 02 INSTALL
KONFIGURASI PASCA-INSTALL
Setup Awal Server
BASH
# 1. Login sebagai root atau user dengan sudo# Jika login sebagai user biasa, gunakan sudo untuk command root# 2. Update sistem (WAJIB setelah install)sudo apt update↳ Update daftar package dari repositorysudo apt upgrade-y↳ Upgrade semua package ke versi terbaru↳ -y = otomatis yes, tidak tanya konfirmasisudo apt dist-upgrade-y↳ Upgrade dengan smart conflict handling↳ Bisa install/remove package jika perlu# 3. Install package pentingsudo apt install-y sudo wget curl vim nano htop net-tools dnsutils
↳ sudo = untuk privilege escalation↳ wget = download file dari internet↳ curl = transfer data (HTTP, FTP, dll)↳ vim/nano = text editor↳ htop = task manager interaktif↳ net-tools = ifconfig, netstat (legacy tools)↳ dnsutils = dig, nslookup (DNS tools)# 4. Setup sudo untuk user biasasudo usermod-aG sudo admin
↳ usermod = modify user↳ -aG = append to group↳ sudo = group yang punya akses sudo↳ admin = username yang ditambah ke group sudo# 5. Konfigurasi timezonesudo timedatectl set-timezone Asia/Jakarta
↳ Set timezone ke WIB (Waktu Indonesia Barat)timedatectl↳ Cek status waktu dan timezone# 6. Set hostname (jika ingin ganti)sudo hostnamectl set-hostname web-server
↳ Set hostname baru# 7. Konfigurasi /etc/hostssudo nano /etc/hosts
↳ Edit file hosts untuk mapping hostname ke IP# Tambahkan baris:127.0.1.1 web-server.local web-server# 8. Setup firewall dasar (UFW)sudo apt install ufw
sudo ufw allow SSH
↳ Allow SSH (port 22) agar bisa remotesudo ufw allow 80/tcp
↳ Allow HTTP (untuk web server)sudo ufw allow 443/tcp
↳ Allow HTTPSsudo ufw enable↳ Aktifkan firewallsudo ufw status↳ Cek status firewall# 9. Disable root SSH login (security)sudo nano /etc/ssh/sshd_config
# Cari baris: PermitRootLogin# Ubah menjadi:PermitRootLogin nosudo systemctl restart ssh
↳ Restart SSH service agar perubahan berlaku# 10. Reboot untuk pastikan semua berjalansudo reboot
SETUP AWAL SELESAI: Server Debian sudah siap digunakan. Langkah selanjutnya: install service yang dibutuhkan (web server, database, dll) sesuai kebutuhan.
KOMPETENSI SUB-BAB 2.3
Mampu melakukan setup awal pasca-install
Mengerti pentingnya update sistem
Mampu setup sudo, timezone, hostname
Mampu konfigurasi firewall dasar (UFW)
VOLUME 03 / 17
LINUX COMMAND LINE ESSENTIALS
Menguasai command line Linux. Navigasi file system, manipulasi file & directory, text processing, piping, redirection, dan command essential lainnya yang wajib dikuasai sysadmin.
SUB-BAB5LEVELCLIWAKTU75 MENIT
3.1
VOLUME 03 CLI
NAVIGASI & FILE SYSTEM
Navigasi Directory
BASH
# pwd - Print Working Directory (lihat current directory)pwd# /home/admin# cd - Change Directory (pindah directory)cd /var/log
↳ Pindah ke /var/logcd ..
↳ .. = parent directory (naik 1 level)cd ../..
↳ Naik 2 levelcd ~
↳ ~ = home directory (cd tanpa argumen juga ke home)cd -
↳ - = previous directory (kembali ke directory sebelumnya)# ls - List (lihat isi directory)ls↳ List file & directory di current directoryls-l↳ -l = long format (detail: permission, owner, size, date)# -rw-r--r-- 1 admin admin 1234 Jan 15 10:30 file.txtls-la↳ -a = all (termasuk hidden file yang diawali .)ls-lh↳ -h = human-readable (size dalam KB, MB, GB)ls-lt↳ -t = sort by time (terbaru di atas)ls-lS↳ -S = sort by size (terbesar di atas)ls-lR↳ -R = recursive (list semua subdirectory)ls--color=auto↳ Tampilkan dengan warna (file, directory, symlink berbeda warna)
Manipulasi File & Directory
BASH
# mkdir - Make Directorymkdir mydir
↳ Buat directory barumkdir-p dir1/dir2/dir3
↳ -p = parents, buat directory beserta parent-nya# touch - Buat file kosong atau update timestamptouch file.txt
↳ Buat file kosong. Jika file sudah ada, update timestamp# cp - Copycp file.txt backup.txt
↳ Copy filecp-r dir1 dir2
↳ -r = recursive, copy directory beserta isinyacp-i file.txt existing.txt
↳ -i = interactive, tanya sebelum overwrite# mv - Move/Renamemv old.txt new.txt
↳ Rename filemv file.txt /path/to/destination/
↳ Pindah file ke directory lainmv-i file.txt existing.txt
↳ -i = tanya sebelum overwrite# rm - Removerm file.txt
↳ Hapus filerm-r directory
↳ -r = recursive, hapus directory beserta isinyarm-rf directory
↳ -f = force, tidak tanya konfirmasi (HATI-HATI!)rm-i file.txt
↳ -i = interactive, tanya sebelum hapus# rmdir - Remove empty directoryrmdir emptydir
↳ Hapus directory yang kosong saja
PERINGATAN:rm -rf sangat berbahaya! Salah ketik bisa hapus data penting. Selalu double-check path sebelum eksekusi. Pertimbangkan pakai rm -ri (interactive) untuk safety.
KOMPETENSI SUB-BAB 3.1
Mampu navigasi file system dengan cd, pwd, ls
Mampu buat, copy, move, rename, hapus file & directory
Memahami flag umum (-r, -f, -i, -p, -l, -a)
3.2
VOLUME 03 CLI
VIEW, SEARCH & TEXT PROCESSING
Melihat Isi File
BASH
# cat - Concatenate (lihat isi file)cat file.txt
↳ Tampilkan seluruh isi filecat-n file.txt
↳ -n = number lines (tampilkan nomor baris)# less - Pager (scroll file besar)less file.txt
↳ Buka file dengan pager, bisa scroll up/down↳ Tekan q untuk keluar, / untuk search# more - Pager sederhanamore file.txt
↳ Seperti less tapi hanya bisa scroll down# head - Lihat awal filehead file.txt
↳ Tampilkan 10 baris pertama (default)head-n 20 file.txt
↳ -n 20 = tampilkan 20 baris pertama# tail - Lihat akhir filetail file.txt
↳ Tampilkan 10 baris terakhir (default)tail-n 20 file.txt
↳ -n 20 = tampilkan 20 baris terakhirtail-f /var/log/syslog
↳ -f = follow, tampilkan baris baru secara real-time↳ Sangat berguna untuk monitoring log!# wc - Word Countwc file.txt
↳ Hitung baris, kata, karakterwc-l file.txt
↳ -l = lines onlywc-w file.txt
↳ -w = words onlywc-c file.txt
↳ -c = characters only
Search & Filter
BASH
# grep - Global Regular Expression Print (cari text)grep"error" /var/log/syslog
↳ Cari kata "error" di file sysloggrep-i"error" /var/log/syslog
↳ -i = case-insensitive (Error, ERROR, error semua match)grep-r"pattern" /path/to/dir
↳ -r = recursive, cari di semua file dalam directorygrep-n"pattern" file.txt
↳ -n = tampilkan nomor barisgrep-v"pattern" file.txt
↳ -v = invert match (tampilkan baris yang TIDAK match)grep-c"pattern" file.txt
↳ -c = count (hitung jumlah match)grep-l"pattern" *.txt
↳ -l = files with matches (tampilkan nama file yang match)# find - Cari file berdasarkan kriteriafind /home -name"*.txt"↳ Cari semua file .txt di /home dan subdirectoryfind / -type f -size +100M
↳ -type f = file saja (bukan directory)↳ -size +100M = ukuran lebih dari 100MBfind /var/log -mtime +7
↳ -mtime +7 = dimodifikasi lebih dari 7 hari lalufind /tmp -type f -delete↳ -delete = hapus file yang ditemukan (HATI-HATI!)# locate - Cari file cepat (pakai database)sudo updatedb↳ Update database locate (perlu dijalankan pertama kali)locate filename.txt
↳ Cari file berdasarkan nama (sangat cepat)
Text Processing
BASH
# sort - Urutkan barissort file.txt
↳ Urutkan baris secara alfabetissort-n file.txt
↳ -n = numeric sort (urutkan sebagai angka)sort-r file.txt
↳ -r = reverse (urutkan terbalik)sort-u file.txt
↳ -u = unique (hilangkan duplikat)# uniq - Hilangkan baris duplikat (bersebelahan)sort file.txt | uniq↳ Sort dulu, baru uniq (uniq butuh input sorted)sort file.txt | uniq-c↳ -c = count (tampilkan jumlah kemunculan)# cut - Potong kolomcut-d: -f1 /etc/passwd
↳ -d: = delimiter : (pemisah kolom)↳ -f1 = field 1 (kolom pertama)↳ Output: daftar username di sistemcut-d: -f1,3 /etc/passwd
↳ -f1,3 = field 1 dan 3 (username dan UID)# awk - Text processing powerfulawk'{print $1}' file.txt
↳ Print kolom pertama (default delimiter: whitespace)awk-F: '{print $1, $3}' /etc/passwd
↳ -F: = field separator :↳ Print kolom 1 dan 3awk'$3 > 1000 {print $1}' /etc/passwd
↳ Print username dengan UID > 1000 (user biasa)# sed - Stream Editor (replace text)sed's/old/new/g' file.txt
↳ s = substitute, old = text lama, new = text baru↳ g = global (ganti semua, bukan hanya yang pertama)sed-i's/old/new/g' file.txt
↳ -i = in-place (edit file langsung)sed'5d' file.txt
↳ 5d = delete baris ke-5sed'2,5d' file.txt
↳ 2,5d = delete baris 2 sampai 5
KOMPETENSI SUB-BAB 3.2
Mampu melihat isi file dengan cat, less, head, tail
Mampu search dengan grep dan find
Mampu text processing dengan sort, uniq, cut, awk, sed
3.3
VOLUME 03 CLI
PIPE, REDIRECTION & WILDCARD
Redirection
BASH
# Output redirection (stdout)ls > file.txt
↳ > = redirect output ke file (overwrite)ls >> file.txt
↳ >> = append (tambahkan ke akhir file)# Error redirection (stderr)find / -name"*.conf" 2> errors.txt
↳ 2> = redirect error (stderr) ke file# Redirect stdout dan stderr ke file berbedacommand > output.txt 2> errors.txt
↳ stdout ke output.txt, stderr ke errors.txt# Redirect stdout dan stderr ke file yang samacommand > all.txt 2>&1
↳ 2>&1 = redirect stderr ke tempat yang sama dengan stdoutcommand &> all.txt
↳ &> = shortcut untuk > file 2>&1# Input redirectionsort < file.txt
↳ < = redirect input dari file# Here document (multi-line input)cat << EOFBaris 1Baris 2Baris 3EOF↳ << EOF = mulai here document, akhiri dengan EOF di baris baru
Pipe
BASH
# Pipe (|) - Output command jadi input command berikutnyals | grep".txt"↳ List file, lalu filter hanya yang .txtcat /etc/passwd | grep"root"↳ Tampilkan isi /etc/passwd, cari baris yang berisi "root"ps aux | grep"nginx"↳ List process, cari yang nginxls-l | sort-k5 -n-r↳ List detail, sort by kolom 5 (size), numeric, reversecat file.txt | sort | uniq-c | sort-nr↳ Sort → unik → count → sort by count descending# Tee - Output ke screen DAN file sekaligusls | tee output.txt
↳ Tampilkan di screen, simpan juga ke filels | tee-a output.txt
↳ -a = append (tambahkan ke file)# xargs - Execute command dari inputfind . -name"*.log" | xargsrm↳ Cari file .log, lalu hapus satu per satuecho"file1 file2 file3" | xargstouch↳ Buat 3 file sekaligus
Wildcard (Globbing)
BASH
# * - Match zero or more charactersls *.txt
↳ Semua file dengan ekstensi .txtls file*
↳ Semua file yang diawali "file"# ? - Match exactly one characterls file?.txt
↳ file1.txt, file2.txt, tapi BUKAN file10.txt# [] - Match any character in bracketsls file[1-3].txt
↳ file1.txt, file2.txt, file3.txtls file[abc].txt
↳ filea.txt, fileb.txt, filec.txt# [!] - Match any character NOT in bracketsls file[!1-3].txt
↳ Semua file.txt KECUALI file1.txt, file2.txt, file3.txt# Contoh penggunaancp *.jpg /backup/images/
↳ Copy semua file .jpg ke directory backuprm *.{log,tmp,bak}
↳ Hapus semua file .log, .tmp, .bak (brace expansion)find /var/log -name"*.log"-mtime +30 -delete↳ Cari & hapus file .log yang lebih dari 30 hari
KOMPETENSI SUB-BAB 3.3
Mampu redirect output/error dengan >, >>, 2>
Mampu menggunakan pipe (|) untuk chaining command
Mampu menggunakan wildcard (*, ?, [])
VOLUME 04 / 17
FILE SYSTEM & STORAGE MANAGEMENT
Filesystem Hierarchy Standard (FHS), mount/unmount, fstab, disk partitioning, LVM (Logical Volume Manager), dan manajemen storage tingkat lanjut.
SUB-BAB4LEVELStorageWAKTU70 MENIT
4.1
VOLUME 04 STORAGE
FILESYSTEM HIERARCHY STANDARD (FHS)
Struktur Direktori Linux
FHS (Filesystem Hierarchy Standard) adalah standar struktur direktori di Linux. Semua distro mengikuti standar ini agar konsisten.
DIRECTORY
FUNGSI
CONTOH ISI
/
Root directory (puncak hierarki)
Semua directory lain ada di sini
/bin
Binary esensial (user commands)
ls, cp, mv, bash
/sbin
Binary esensial (system admin)
fdisk, iptables, reboot
/etc
Configuration files
/etc/passwd, /etc/fstab, /etc/hosts
/home
Home directory user biasa
/home/admin, /home/user1
/root
Home directory root
Khusus root user
/var
Variable data (berubah-ubah)
/var/log, /var/www, /var/spool
/tmp
Temporary files (dihapus saat reboot)
File sementara aplikasi
/usr
User programs & data
/usr/bin, /usr/lib, /usr/share
/opt
Optional/third-party software
Software tambahan (contoh: /opt/google)
/dev
Device files
/dev/sda, /dev/tty, /dev/null
/proc
Virtual filesystem (process info)
/proc/cpuinfo, /proc/meminfo
/sys
Virtual filesystem (hardware info)
/sys/class, /sys/block
/boot
Boot loader files
vmlinuz, initrd, grub
/lib
Shared libraries
Library untuk /bin dan /sbin
/mnt
Mount point temporary
Mount manual filesystem
/media
Mount point removable media
USB, CD-ROM auto-mount
/srv
Service data
/srv/ftp, /srv/www
PENTING: Jangan asal hapus file di /bin, /sbin, /lib, /etc! File-file ini esensial untuk sistem. Selalu backup sebelum modifikasi.
KOMPETENSI SUB-BAB 4.1
Memahami struktur direktori Linux (FHS)
Tahu fungsi setiap directory utama
Mampu navigasi file system dengan percaya diri
4.2
VOLUME 04 STORAGE
MOUNT & FSTAB
Konsep Mount
Mount adalah proses mengaitkan filesystem (partisi) ke directory tertentu di file system tree. Di Linux, semua storage diakses melalui directory (mount point).
BASH
# Lihat filesystem yang sedang mounteddf-h↳ -h = human-readable (GB, MB)# Filesystem Size Used Avail Use% Mounted on# /dev/sda1 20G 5.2G 14G 28% /# /dev/sda2 50G 12G 35G 26% /homelsblk↳ List block devices (disk, partisi, mount point)# NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT# sda 8:0 0 50G 0 disk# ├─sda1 8:1 0 20G 0 part /# └─sda2 8:2 0 30G 0 part /homemount↳ Tampilkan semua mount dengan detailfindmnt↳ Tree view mount points (lebih rapi)# Mount manual filesystemsudo mount /dev/sdb1 /mnt
↳ Mount partisi /dev/sdb1 ke directory /mntsudo mount-t ext4 /dev/sdb1 /mnt
↳ -t ext4 = specify filesystem typesudo mount-o ro /dev/sdb1 /mnt
↳ -o ro = read-onlysudo mount-o rw /dev/sdb1 /mnt
↳ -o rw = read-write (default)# Unmount filesystemsudo umount /mnt
↳ Unmount dari mount pointsudo umount /dev/sdb1
↳ Unmount dari device# Cek penggunaan diskdu-sh /var/log
↳ -s = summary, -h = human-readable↳ Lihat total ukuran /var/logdu-sh /*
↳ Lihat ukuran setiap directory di rootdu-h--max-depth=1 /home
↳ Lihat ukuran subdirectory di /home (depth 1)
/etc/fstab
/etc/fstab (filesystem table) adalah file konfigurasi yang mendefinisikan filesystem yang harus di-mount saat boot. Format:
# device mountpoint fstype options dump pass
BASH
# Lihat isi /etc/fstabcat /etc/fstab
# /etc/fstab: static file system information## UUID=xxxx-xxxx / ext4 errors=remount-ro 0 1# UUID=yyyy-yyyy /home ext4 defaults 0 2# UUID=zzzz-zzzz none swap sw 0 0# Penjelasan kolom:# 1. Device/UUID : Partisi yang di-mount# 2. Mount point : Directory tujuan mount# 3. Filesystem type: ext4, xfs, swap, dll# 4. Options : defaults, ro, noexec, dll# 5. Dump : 0 = tidak di-backup, 1 = di-backup# 6. Pass : 0 = tidak dicek, 1 = root fs, 2 = lainnya# Lihat UUID semua partisiblkid↳ Tampilkan UUID dan type semua partisi# /dev/sda1: UUID="xxxx-xxxx" TYPE="ext4"# /dev/sda2: UUID="yyyy-yyyy" TYPE="ext4"# Edit /etc/fstab (HATI-HATI! Salah edit = sistem tidak boot)sudo cp /etc/fstab /etc/fstab.backup
↳ Backup dulu sebelum edit!sudo nano /etc/fstab
↳ Edit dengan nano# Test fstab tanpa rebootsudo mount-a↳ -a = mount all dari fstab↳ Jika ada error, perbaiki sebelum reboot!# Contoh menambah entry ke fstab# Mount /dev/sdb1 ke /data dengan ext4UUID=abcd-1234 /data ext4 defaults 0 2# Mount dengan opsi khususUUID=abcd-1234 /data ext4 defaults,noatime,nodiratime 0 2↳ noatime = tidak update access time (performa)↳ nodiratime = tidak update directory access time
PERINGATAN: Salah edit /etc/fstab bisa membuat sistem TIDAK BISA BOOT. Selalu backup fstab sebelum edit, dan test dengan mount -a sebelum reboot.
KOMPETENSI SUB-BAB 4.2
Memahami konsep mount dan mount point
Mampu mount/unmount filesystem manual
Mampu edit /etc/fstab dengan aman
Mampu cek penggunaan disk dengan df dan du
4.3
VOLUME 04 STORAGE
DISK PARTITIONING & FORMAT
Partisi Disk
BASH
# Lihat informasi disklsblk↳ List block devicessudo fdisk-l↳ List semua disk dan partisi dengan detailsudo parted-l↳ List partisi dengan parted (support GPT)# Partisi disk dengan fdisk (MBR)sudo fdisk /dev/sdb
↳ Buka fdisk untuk disk /dev/sdb# Command di dalam fdisk:# m = help (lihat semua command)# p = print partition table# n = new partition# d = delete partition# t = change partition type# w = write changes to disk# q = quit without saving# Partisi disk dengan parted (GPT)sudo parted /dev/sdb
# Command di dalam parted:# print = lihat partisi# mklabel gpt = buat GPT partition table# mkpart primary ext4 0% 50% = buat partisi 50% disk# quit = keluar# Format partisi dengan filesystemsudo mkfs.ext4 /dev/sdb1
↳ Format partisi dengan ext4sudo mkfs.xfs /dev/sdb1
↳ Format dengan XFS (performa tinggi)sudo mkfs.vfat /dev/sdb1
↳ Format dengan FAT32 (kompatibel Windows)sudo mkswap /dev/sdb2
↳ Format sebagai swap# Label partisisudo e2label /dev/sdb1 data
↳ Beri label "data" ke partisi ext4sudo e2label /dev/sdb1
↳ Lihat label partisi
Jenis Filesystem
FILESYSTEM
KELEBIHAN
KEKURANGAN
USE CASE
ext4
Stabil, mature, kompatibel
Tidak ada snapshot
Default Linux, general purpose
XFS
Performa tinggi, scalable
Tidak bisa shrink
Large files, server
Btrfs
Snapshot, checksum, RAID
Masih berkembang
Advanced features
ZFS
Enterprise-grade, snapshot
RAM intensive
Enterprise, NAS
FAT32
Kompatibel semua OS
Max file 4GB
USB, compatibility
NTFS
Windows compatible
Linux read/write terbatas
Dual boot Windows
swap
Virtual memory
-
RAM overflow
KOMPETENSI SUB-BAB 4.3
Mampu partisi disk dengan fdisk/parted
Mampu format partisi dengan berbagai filesystem
Memahami perbedaan ext4, XFS, Btrfs
4.4
VOLUME 04 STORAGE
LVM (LOGICAL VOLUME MANAGER)
Konsep LVM
LVM adalah sistem manajemen storage yang memberikan fleksibilitas tinggi. Dengan LVM, kamu bisa:
RESIZE DYNAMIC
Ubah ukuran volume tanpa downtime
SNAPSHOT
Buat snapshot untuk backup
STRIPING
Gabung multiple disk untuk performa
MIRRORING
Redundansi data (RAID 1-like)
Arsitektur LVM
KOMPONEN
DESKRIPSI
ANALOGI
Physical Volume (PV)
Disk/partisi fisik yang digunakan LVM
Bahan baku
Volume Group (VG)
Pool storage dari gabungan PV
Gudang penyimpanan
Logical Volume (LV)
"Partisi virtual" dari VG
Rak di gudang
BASH
# Install LVM toolssudo apt install lvm2
# 1. Buat Physical Volumesudo pvcreate /dev/sdb1 /dev/sdc1
↳ Inisialisasi partisi sebagai PVsudo pvs↳ List Physical Volumessudo pvdisplay↳ Detail Physical Volumes# 2. Buat Volume Groupsudo vgcreate myvg /dev/sdb1 /dev/sdc1
↳ Buat VG "myvg" dari 2 PVsudo vgs↳ List Volume Groupssudo vgdisplay↳ Detail Volume Groups# 3. Buat Logical Volumesudo lvcreate-L 10G -n data myvg
↳ -L 10G = size 10GB↳ -n data = nama LV "data"↳ myvg = nama VGsudo lvcreate-l 100%FREE -n backup myvg
↳ -l 100%FREE = gunakan semua space tersisasudo lvs↳ List Logical Volumessudo lvdisplay↳ Detail Logical Volumes# 4. Format LV dengan filesystemsudo mkfs.ext4 /dev/myvg/data
# 5. Mount LVsudo mkdir /data
sudo mount /dev/myvg/data /data
# 6. Tambah ke /etc/fstab/dev/myvg/data /data ext4 defaults 0 2# Resize Logical Volumesudo lvextend-L +5G /dev/myvg/data
↳ Tambah 5GB ke LVsudo resize2fs /dev/myvg/data
↳ Resize filesystem ext4 (harus setelah lvextend)sudo lvextend-l +100%FREE /dev/myvg/data
↳ Gunakan semua free space di VG# Remove LVMsudo umount /data
sudo lvremove /dev/myvg/data
sudo vgremove myvg
sudo pvremove /dev/sdb1 /dev/sdc1
KOMPETENSI SUB-BAB 4.4
Memahami konsep LVM (PV, VG, LV)
Mampu setup LVM dari awal
Mampu resize Logical Volume
VOLUME 05 / 17
USER, GROUP & PERMISSIONS
User management, group management, file permissions (chmod, chown), ACL (Access Control Lists), dan sudo. Fondasi keamanan Linux.
SUB-BAB4LEVELAccessWAKTU60 MENIT
5.1
VOLUME 05 ACCESS
USER MANAGEMENT
Manajemen User
BASH
# Lihat user yang sedang loginwhoami↳ Tampilkan username saat iniwho↳ Lihat siapa saja yang loginw↳ Lihat siapa login dan apa yang mereka lakukanlast↳ Lihat history login# Lihat daftar usercat /etc/passwd
↳ File berisi info semua user↳ Format: username:password:UID:GID:comment:home:shellcut-d: -f1 /etc/passwd
↳ Tampilkan hanya username# Tambah user barusudo useradd newuser
↳ Buat user baru (tanpa home directory)sudo useradd-m newuser
↳ -m = create home directory (/home/newuser)sudo useradd-m-s /bin/bash newuser
↳ -s /bin/bash = set default shellsudo useradd-m-G sudo,developers newuser
↳ -G = tambahkan ke group tambahan# Set password usersudo passwd newuser
↳ Set/change password untuk user# Modifikasi usersudo usermod-aG sudo newuser
↳ -aG = append to group (tambah ke group tanpa hapus dari group lain)sudo usermod-s /bin/zsh newuser
↳ -s = change shellsudo usermod-L newuser
↳ -L = lock account (tidak bisa login)sudo usermod-U newuser
↳ -U = unlock accountsudo usermod-e 2026-12-31 newuser
↳ -e = set expiration date# Hapus usersudo userdel newuser
↳ Hapus user (home directory tetap ada)sudo userdel-r newuser
↳ -r = remove home directory juga# Ganti user (switch user)su newuser
↳ Switch ke user newusersu - newuser
↳ - = load environment user baru (recommended)# Lihat info userid newuser
↳ Lihat UID, GID, dan groups userfinger newuser
↳ Lihat detail info user (jika finger terinstall)
KOMPETENSI SUB-BAB 5.1
Mampu menambah, modifikasi, dan hapus user
Mampu set password dan lock/unlock account
Memahami struktur /etc/passwd
5.2
VOLUME 05 ACCESS
GROUP MANAGEMENT
Manajemen Group
BASH
# Lihat daftar groupcat /etc/group
↳ File berisi info semua group↳ Format: groupname:password:GID:membersgroups↳ Lihat group user saat inigroups newuser
↳ Lihat group untuk user tertentu# Tambah group barusudo groupadd developers
↳ Buat group barusudo groupadd-g 1500 developers
↳ -g = specify GID# Tambah user ke groupsudo usermod-aG developers newuser
↳ -aG = append to group (tambah tanpa hapus dari group lain)sudo gpasswd-a newuser developers
↳ Cara alternatif tambah user ke group# Hapus user dari groupsudo gpasswd-d newuser developers
↳ -d = delete from group# Set primary group usersudo usermod-g developers newuser
↳ -g = set primary group (lowercase g)# Hapus groupsudo groupdel developers
↳ Hapus group (tidak bisa hapus primary group user)# Ganti nama groupsudo groupmod-n newname oldname
↳ -n = new name# Lihat anggota groupgetent group developers
↳ Lihat detail group termasuk anggotamembers developers
↳ List anggota group (jika members terinstall)# Group penting di Debian# root : UID 0, superuser# sudo : user di group ini bisa pakai sudo# adm : bisa baca log di /var/log# www-data : user untuk web server (Apache/Nginx)# ssh : user untuk SSH server# docker : bisa jalankan docker tanpa sudo
KOMPETENSI SUB-BAB 5.2
Mampu menambah, modifikasi, dan hapus group
Mampu tambah/hapus user dari group
Memahami group-group penting di Debian
5.3
VOLUME 05 ACCESS
FILE PERMISSIONS (CHMOD, CHOWN)
Memahami Permission
Setiap file/directory di Linux memiliki owner (pemilik), group, dan permissions (hak akses). Permission terdiri dari 3 kategori:
PERMISSION
ANGKA
FILE
DIRECTORY
r (read)
4
Baca isi file
List isi directory (ls)
w (write)
2
Modifikasi file
Tambah/hapus file di directory
x (execute)
1
Jalankan file sebagai program
Masuk ke directory (cd)
Permission diterapkan ke 3 kategori user:
KATEGORI
SIMBOL
ARTI
User (owner)
u
Pemilik file
Group
g
Group pemilik file
Other
o
Semua orang lain
Membaca Permission
BASH
# Lihat permissionls-l file.txt
# -rw-r--r-- 1 admin admin 1234 Jan 15 10:30 file.txt# Penjelasan:# - = file type (- = file, d = directory, l = symlink)# rw- = owner permission (read, write, no execute)# r-- = group permission (read only)# r-- = other permission (read only)# 1 = number of hard links# admin = owner# admin = group# 1234 = size in bytes# Jan 15 10:30 = modification time# file.txt = filename# Contoh lain:# drwxr-xr-x 2 root root 4096 Jan 15 10:30 /etc# d = directory# rwx = owner (root) punya full access# r-x = group (root) bisa read & execute, tidak write# r-x = other bisa read & execute, tidak write# -rwxr-xr-x 1 admin admin 1234 Jan 15 10:30 script.sh# File executable (script)# Owner bisa read, write, execute# Group & other bisa read & execute
# chown - Change Ownersudo chown newuser file.txt
↳ Ubah owner file menjadi newusersudo chown newuser:newgroup file.txt
↳ Ubah owner DAN group sekaligussudo chown :newgroup file.txt
↳ Ubah group saja (owner tetap)sudo chown-R newuser:newgroup /path/to/directory
↳ -R = recursive, terapkan ke semua isi directory# chgrp - Change Groupsudo chgrp newgroup file.txt
↳ Ubah group filesudo chgrp-R newgroup /path/to/directory
↳ Recursive# Contoh penggunaansudo chown www-data:www-data /var/www/html
↳ Set ownership untuk web serversudo chmod-R 755 /var/www/html
↳ Set permission untuk web directory
KOMPETENSI SUB-BAB 5.3
Memahami sistem permission Linux (rwx)
Mampu gunakan chmod (numeric & symbolic)
Mampu gunakan chown dan chgrp
Tahu permission umum untuk file & directory
VOLUME 06 / 17
APT & PACKAGE MANAGEMENT
Package management dengan APT (Advanced Package Tool). Install, remove, update, upgrade, repository management, dan troubleshooting package.
SUB-BAB3LEVELPackageWAKTU50 MENIT
6.1
VOLUME 06 PACKAGE
APT COMMANDS
BASH
# Update package list (dari repository)sudo apt update↳ Download daftar package terbaru dari repository↳ WAJIB dijalankan sebelum install/upgrade# Upgrade semua packagesudo apt upgrade-y↳ Upgrade semua package ke versi terbaru↳ -y = auto-yes, tidak tanya konfirmasi# Dist-upgrade (smart upgrade)sudo apt dist-upgrade-y↳ Upgrade dengan dependency handling cerdas↳ Bisa install/remove package jika perlu# Install packagesudo apt install nginx
↳ Install package nginxsudo apt install nginx php mysql-server
↳ Install multiple package sekaligussudo apt install-y nginx
↳ -y = auto-yes# Remove packagesudo apt remove nginx
↳ Remove package (config files tetap ada)sudo apt purge nginx
↳ Remove package + config filessudo apt autoremove↳ Hapus package yang tidak lagi dibutuhkan (dependency)# Search packageapt search nginx
↳ Cari package dengan kata kunci "nginx"# Info packageapt show nginx
↳ Tampilkan detail info package# List installed packagesapt list--installed↳ List semua package yang terinstalldpkg--list↳ Cara alternatif list package# Check package statusdpkg-s nginx
↳ Status package nginx# List files in packagedpkg-L nginx
↳ List semua file yang diinstall oleh package nginx# Find which package owns a filedpkg-S /etc/nginx/nginx.conf
↳ Cari package yang memiliki file tersebut# Clean cachesudo apt clean↳ Hapus semua cached .deb filessudo apt autoclean↳ Hapus cached .deb files yang obsolete# Fix broken packagessudo apt--fix-broken install
↳ Perbaiki dependency yang rusaksudo dpkg--configure-a↳ Configure package yang belum terkonfigurasi
KOMPETENSI SUB-BAB 6.1
Mampu update, upgrade, install, remove package
Mampu search dan info package
Mampu troubleshoot broken packages
VOLUME 07 / 17
DEBIAN NETWORKING FUNDAMENTALS
Network interfaces, IP configuration, routing, DNS, netplan, ip command, dan network troubleshooting di Debian.
SUB-BAB3LEVELNetworkWAKTU60 MENIT
7.1
VOLUME 07 NETWORK
IP CONFIGURATION & INTERFACES
BASH
# Lihat network interfacesip link show↳ Tampilkan semua network interfacesip addr show↳ Tampilkan IP address semua interfacesip a↳ Shortcut untuk ip addr showifconfig↳ Cara lama (legacy, perlu net-tools)# Lihat IP address interface tertentuip addr show eth0
↳ IP address interface eth0# Set IP address manualsudo ip addr add 192.168.1.100/24 dev eth0
↳ Set IP 192.168.1.100 dengan subnet /24 ke eth0sudo ip addr del 192.168.1.100/24 dev eth0
↳ Hapus IP address dari interface# Enable/disable interfacesudo ip link set eth0 up
↳ Activate interfacesudo ip link set eth0 down
↳ Deactivate interface# Lihat routing tableip route show↳ Tampilkan routing tableip r↳ Shortcut# Add default gatewaysudo ip route add default via 192.168.1.1
↳ Set default gateway ke 192.168.1.1# Add static routesudo ip route add 10.0.0.0/8 via 192.168.1.254
↳ Route ke network 10.0.0.0/8 via gateway 192.168.1.254# Delete routesudo ip route del 10.0.0.0/8
# Lihat DNS configurationcat /etc/resolv.conf
↳ File berisi DNS server yang digunakan# Test konektivitasping 8.8.8.8
↳ Test koneksi ke Google DNSping-c 4 google.com
↳ -c 4 = kirim 4 packet sajatraceroute google.com
↳ Lihat route ke tujuanmtr google.com
↳ Kombinasi ping + traceroute (real-time)# Lihat listening portssudo ss-tulpn↳ -t = TCP, -u = UDP, -l = listening, -p = program, -n = numericsudo netstat-tulpn↳ Cara lama (legacy)
KOMPETENSI SUB-BAB 7.1
Mampu konfigurasi IP address manual
Mampu set default gateway dan static route
Mampu test konektivitas dengan ping, traceroute
VOLUME 08 / 17
SSH & REMOTE ADMINISTRATION
SSH server & client configuration, key-based authentication, SSH config file, port forwarding, dan secure remote administration.
SUB-BAB3LEVELRemoteWAKTU50 MENIT
8.1
VOLUME 08 SSH
SSH SERVER CONFIGURATION
BASH
# Install SSH serversudo apt install openssh-server
# Cek status SSH servicesudo systemctl status ssh
↳ Lihat status SSH service# Enable SSH start on bootsudo systemctl enable ssh
# Start/restart SSHsudo systemctl start ssh
sudo systemctl restart ssh
# Edit SSH configurationsudo nano /etc/ssh/sshd_config
# Konfigurasi penting:Port 2222↳ Ubah port SSH (default 22) untuk securityPermitRootLogin no↳ Disable root login (security)PasswordAuthentication no↳ Disable password auth (pakai key saja)PubkeyAuthentication yes↳ Enable key-based authenticationAllowUsers admin deploy↳ Hanya user tertentu yang bisa SSHAllowGroups sshusers↳ Hanya group tertentu yang bisa SSHMaxAuthTries 3↳ Max percobaan login sebelum disconnectClientAliveInterval 300↳ Keep-alive interval (detik)ClientAliveCountMax 2↳ Max missed keep-alive sebelum disconnect# Restart SSH setelah edit configsudo systemctl restart ssh
# Allow SSH di firewallsudo ufw allow 2222/tcp
↳ Allow port 2222 (custom SSH port)
KOMPETENSI SUB-BAB 8.1
Mampu install dan konfigurasi SSH server
Mampu hardening SSH (disable root, change port)
Memahami konfigurasi sshd_config
VOLUME 09 / 17
PROCESS, SERVICE & SYSTEMD
Process management, systemd service, unit files, systemctl commands, dan service administration.
SUB-BAB3LEVELServiceWAKTU50 MENIT
9.1
VOLUME 09 SERVICE
SYSTEMD & SYSTEMCTL
BASH
# systemctl - Kontrol systemd# Start servicesudo systemctl start nginx
↳ Start service nginx# Stop servicesudo systemctl stop nginx
# Restart servicesudo systemctl restart nginx
# Reload configuration (tanpa restart)sudo systemctl reload nginx
# Enable service (start on boot)sudo systemctl enable nginx
# Disable service (tidak start on boot)sudo systemctl disable nginx
# Status servicesystemctl status nginx
↳ Lihat status, PID, memory, logs# List all servicessystemctl list-units--type=service
# List failed servicessystemctl--failed# Process managementps aux↳ List semua processps aux | grep nginx
↳ Cari process nginxtop↳ Real-time process monitor (interactive)htop↳ Enhanced top (lebih user-friendly)kill 1234
↳ Kill process dengan PID 1234killall nginx
↳ Kill semua process bernama nginxpkill-f nginx
↳ Kill process yang match pattern
KOMPETENSI SUB-BAB 9.1
Mampu start/stop/restart/enable/disable service
Mampu cek status service
Mampu manage process dengan ps, kill, top
VOLUME 10 / 17
SYSTEM MONITORING & LOGS
System monitoring dengan top, htop, journalctl, log rotation, dan performance analysis.
SUB-BAB2LEVELMonitorWAKTU40 MENIT
10.1
VOLUME 10 MONITOR
MONITORING & LOGS
BASH
# journalctl - System logsjournalctl↳ Lihat semua logsjournalctl-u nginx
↳ -u = unit, logs untuk service nginxjournalctl-f↳ -f = follow, real-time logsjournalctl--since"1 hour ago"↳ Logs dari 1 jam terakhirjournalctl-p err
↳ -p = priority, hanya error# System infouname-a↳ Kernel & system infolsb_release-a↳ Debian version infouptime↳ System uptime & load averagefree-h↳ Memory usagedf-h↳ Disk usage# Performance monitoringvmstat 1
↳ Virtual memory stats, update setiap 1 detikiostat 1
↳ I/O statisticssar-u 1
↳ CPU usage (perlu sysstat)
KOMPETENSI SUB-BAB 10.1
Mampu baca system logs dengan journalctl
Mampu monitor performance dengan top, vmstat, iostat
VOLUME 11 / 17
WEB SERVER FUNDAMENTALS
Apache, Nginx, virtual hosts, SSL/TLS, PHP-FPM, dan web server configuration.
Kamu telah menyelesaikan 17 volume seri Debian Server Essentials. Dari fundamental Linux hingga server administration, troubleshooting, dan recovery. Kamu sekarang memiliki fondasi yang kuat untuk menjadi Debian/Linux system administrator profesional. Terus belajar, terus praktik, dan jangan takut eksperimen!