0Pricing
Linux Command Line Mastery · Pelajaran

Pengelolaan Layanan: `systemctl` (systemd)

Kendalikan dan kelola layanan serta daemon sistem menggunakan perintah `systemctl`.

Pengelolaan Layanan: `systemctl` (systemd) adalah pelajaran Linux Command Line Mastery gratis di CoddyKit. Ini adalah pelajaran 2 dari 4. Kamu bisa membaca pelajaran lengkapnya di bawah secara gratis — lalu praktikkan langsung di browser dengan editor kode bawaan dan tutor AI 24/7. Ini adalah bagian dari jalur belajar Linux Command Line Mastery, dan progresmu tersinkronisasi di web dan aplikasi CoddyKit. Kursus Linux Command Line Mastery mencakup 4 pelajaran total.

Bagian dari pelajaran ini belum diterjemahkan dan ditampilkan dalam bahasa Inggris.

What are System Services?

On Linux, many programs run silently in the background to perform essential tasks. These are called services or daemons.

Think of them as silent helpers: a web server, a database, or even your Wi-Fi manager. They often start automatically when your system boots.

Meet systemd

systemd is the initialization system used by most modern Linux distributions (like Ubuntu, Fedora, CentOS).

It's responsible for managing services and processes from boot-up to shut-down, ensuring everything starts and stops in the correct order.

Your Tool: systemctl

To interact with systemd and manage these services, we use the powerful systemctl command.

It's your primary interface for checking status, starting, stopping, enabling, and disabling services on your system.

Check Service Status

The first step is often checking if a service is running. Use systemctl status <service_name>.

Let's check the status of the SSH daemon (sshd), which allows secure remote access to your machine.

systemctl status sshd

Starting a Service

If a service isn't running or you've stopped it, you can start it with systemctl start <service_name>.

This command attempts to begin the service immediately. You'll often need root privileges (using sudo) for most system services.

sudo systemctl start sshd

Stopping a Service

To halt a running service, use systemctl stop <service_name>.

This is useful if you need to perform maintenance or reconfigure a service. Be cautious, as stopping critical services can affect system functionality.

sudo systemctl stop sshd

Restart vs. Reload

Restarting (systemctl restart <service>) fully stops and then starts a service. This is often needed after major configuration changes.

Reloading (systemctl reload <service>) tells a service to re-read its configuration without a full restart, minimizing downtime. Not all services support reload.

sudo systemctl restart sshd

Managing Autostart

Services can be set to start automatically at boot. This is called enabling the service.

  • sudo systemctl enable <service>: Configures a service to start on boot.
  • sudo systemctl disable <service>: Prevents a service from starting on boot.

These commands only modify boot behavior; they don't start/stop the service immediately.

sudo systemctl enable sshd

Listing All Services

To see a list of all loaded services and their current status (active, inactive, enabled, disabled), use systemctl list-units --type=service --all.

This command provides a comprehensive overview of what's configured on your system.

systemctl list-units --type=service --all

Quick Check: Service Control

Which command would you use to prevent the apache2 web server service from starting automatically when your Linux system boots up?

Recap: Service Management

You've learned how to manage system services using the powerful systemctl command!

  • Use status to check a service's state.
  • start, stop, restart to control running services.
  • enable and disable to manage boot-time behavior.
  • list-units --type=service --all to view all services.

Mastering systemctl is crucial for effective Linux system administration.

Pertanyaan yang Sering Diajukan

Apakah pelajaran “Pengelolaan Layanan: `systemctl` (systemd)” gratis?

Ya — teks lengkap “Pengelolaan Layanan: `systemctl` (systemd)” gratis dibaca di sini di web. Untuk praktiknya secara interaktif (editor kode bawaan dan tutor AI 24/7) dan buka sisa kursus Linux Command Line Mastery, upgrade ke CoddyKit PRO. Kursus Linux Command Line Mastery mencakup 4 pelajaran total.

Apa yang akan aku pelajari di “Pengelolaan Layanan: `systemctl` (systemd)”?

Kendalikan dan kelola layanan serta daemon sistem menggunakan perintah `systemctl`. Kamu berlatih Linux Command Line Mastery dengan kode praktik yang langsung kamu jalankan di browser, dan tutor AI 24/7 menjawab pertanyaanmu saat kamu mengerjakan pelajaran ini.

Apakah aku perlu pengalaman untuk memulai Linux Command Line Mastery?

Tidak diperlukan pengalaman sebelumnya. Linux Command Line Mastery di CoddyKit dirancang untuk pemula hingga pelajar tingkat lanjut, jadi kamu bisa memulai di sini atau dari awal dan belajar sesuai kecepatan kamu sendiri. Ini adalah pelajaran 2 dari 4.

Berapa lama pelajaran “Pengelolaan Layanan: `systemctl` (systemd)” memakan waktu?

Sebagian besar pelajaran CoddyKit memakan waktu sekitar 5–10 menit. Setiap pelajaran ringkas dan interaktif, jadi kamu membuat kemajuan stabil dan melanjutkan dari tempat kamu tinggalkan di web dan aplikasi.

Bisakah aku menulis dan menjalankan kode dalam pelajaran Linux Command Line Mastery ini?

Ya. Setiap pelajaran Linux Command Line Mastery menyertakan editor kode bawaan, jadi kamu menulis dan menjalankan kode nyata langsung di browser dan mendapatkan umpan balik AI instan — tidak diperlukan penyiapan lokal.

Semua pelajaran dalam kursus ini

  1. Penjadwalan Tugas: `cron` dan `at`
  2. Pengelolaan Layanan: `systemctl` (systemd)
  3. Mengotomatiskan Tugas dengan Fungsi Shell
  4. Pencatatan Terpusat dan Rotasi dengan journald dan logrotate
← Kembali ke Linux Command Line Mastery