Dịch vụ hệ thống linux

🔧 Nhóm dịch vụ hệ thống cơ bản
🛡️ apparmor.service
Hệ thống bảo mật (giống firewall cấp ứng dụng)
Giới hạn quyền của chương trình → tránh bị hack
☁️ Nhóm cloud-*
Dùng khi VPS tạo từ cloud (Vultr, AWS, etc.)
cloud-init.service
→ Chạy cấu hình ban đầu (user, ssh key…)
cloud-init-local.service
→ Chạy rất sớm khi boot
cloud-config.service
→ Áp dụng config từ cloud
cloud-final.service
→ Bước cuối cùng (setup hoàn tất)
👉 Nếu VPS của bạn là cloud → mấy cái này rất quan trọng
🖥️ console-setup.service
Thiết lập font chữ + bàn phím cho terminal
⏰ cron.service
Chạy task tự động theo lịch
Ví dụ: backup mỗi ngày
🔌 dbus.service
Hệ thống giao tiếp giữa các tiến trình
Rất quan trọng → gần như luôn phải chạy
🚫 fail2ban.service
Chống brute-force (SSH login sai nhiều lần sẽ bị block IP)
Rất nên bật khi chạy server
🖥️ Terminal
getty@tty1.service
→ Cho phép login trực tiếp trên màn hình (tty1)
serial-getty@ttyS0.service
→ Login qua serial (thường dùng trên VPS)
⌨️ keyboard-setup.service
Cấu hình layout bàn phím
⚙️ kmod-static-nodes.service
Tạo các thiết bị hệ thống /dev cần thiết
🌐 Dịch vụ server của bạn
🌍 nginx.service
Web server (rất quan trọng với bạn)
Dùng để chạy website
🖥️ ssh.service
Cho phép bạn SSH vào VPS
Nếu tắt → mất quyền truy cập từ xa
🧠 qemu-guest-agent.service
Giao tiếp giữa VPS và host vật lý
Dùng khi chạy trên máy ảo (KVM, QEMU)
🧱 Nhóm systemd-* (cốt lõi Linux)
📜 systemd-journald.service
Ghi log hệ thống
🧹 systemd-journal-flush.service
Lưu log từ RAM xuống ổ đĩa
👤 systemd-logind.service
Quản lý đăng nhập user
📦 systemd-modules-load.service
Load module kernel
🌐 Network
systemd-networkd.service
→ Quản lý mạng
systemd-networkd-wait-online.service
→ Đợi mạng sẵn sàng
🎲 systemd-random-seed.service
Tạo số ngẫu nhiên (quan trọng cho bảo mật)
💾 systemd-remount-fs.service
Mount lại filesystem với quyền đúng
⚙️ systemd-sysctl.service
Áp dụng cấu hình kernel (/etc/sysctl.conf)
👥 systemd-sysusers.service
Tạo user hệ thống
🕒 systemd-timesyncd.service
Đồng bộ thời gian (NTP)
📁 systemd-tmpfiles-*
Tạo / dọn file tạm
🔌 systemd-udevd.service
Quản lý thiết bị (USB, ổ đĩa...)
🔄 systemd-udev-trigger.service
Kích hoạt phát hiện thiết bị
🧾 systemd-update-utmp.service
Ghi log boot/shutdown
👥 systemd-user-sessions.service
Cho phép user đăng nhập
🔥 Bảo mật
🧱 ufw.service
Firewall đơn giản của Ubuntu
Bạn đã dùng ufw allow 80 → chính là nó
👤 User services
📂 user-runtime-dir@1000.service
Tạo thư mục runtime cho user (UID 1000)
👤 user@1000.service
Quản lý session user (bạn)