0Pricing
Linux Command Line Mastery · Lektion

Dienstverwaltung: `systemctl` (systemd)

Steuern und verwalten Sie Systemdienste und Daemons mit dem Befehl `systemctl`.

Dienstverwaltung: `systemctl` (systemd) ist eine kostenlose Linux Command Line Mastery-Lektion auf CoddyKit. Dies ist Lektion 2 von 4. Du kannst die komplette Lektion unten kostenlos lesen – dann übst du sie direkt im Browser mit einem integrierten Code-Editor und einem KI-Tutor rund um die Uhr. Sie ist Teil des Linux Command Line Mastery-Lernpfads, und dein Fortschritt wird über Web und CoddyKit-App synchronisiert. Der Linux Command Line Mastery-Kurs umfasst insgesamt 4 Lektionen.

Teile dieser Lektion wurden noch nicht übersetzt und werden auf Englisch angezeigt.

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.

Häufig gestellte Fragen

Ist die Lektion „Dienstverwaltung: `systemctl` (systemd)“ kostenlos?

Ja — der vollständige Text von „Dienstverwaltung: `systemctl` (systemd)“ ist hier im Web kostenlos zu lesen. Um sie interaktiv zu üben (integrierter Code-Editor und 24/7 KI-Tutor) und den Rest des Linux Command Line Mastery-Kurses freizuschalten, upgrade auf CoddyKit PRO. Der Linux Command Line Mastery-Kurs umfasst insgesamt 4 Lektionen.

Was lerne ich in „Dienstverwaltung: `systemctl` (systemd)“?

Steuern und verwalten Sie Systemdienste und Daemons mit dem Befehl `systemctl`. Du übst Linux Command Line Mastery mit praktischem Code, den du direkt im Browser ausführst, und ein 24/7 KI-Tutor beantwortet deine Fragen während du die Lektion bearbeitest.

Brauche ich Erfahrung, um Linux Command Line Mastery zu starten?

Keine Vorkenntnisse erforderlich. Linux Command Line Mastery auf CoddyKit ist für Anfänger bis fortgeschrittene Lernende strukturiert, sodass du hier starten oder von Anfang an beginnen und in deinem eigenen Tempo voranschreiten kannst. Dies ist Lektion 2 von 4.

Wie lange dauert die Lektion „Dienstverwaltung: `systemctl` (systemd)“?

Die meisten CoddyKit-Lektionen dauern etwa 5–10 Minuten. Jede ist kompakt und interaktiv, sodass du stetig Fortschritte machst und genau dort weitermachst, wo du aufgehört hast – im Web und in der App.

Kann ich in dieser Linux Command Line Mastery-Lektion Code schreiben und ausführen?

Ja. Jede Linux Command Line Mastery-Lektion enthält einen integrierten Code-Editor, sodass du echten Code direkt in deinem Browser schreibst und ausführst und sofort KI-Feedback erhältst — ohne lokale Einrichtung erforderlich.

Alle Lektionen in diesem Kurs

  1. Aufgabenplanung: `cron` und `at`
  2. Dienstverwaltung: `systemctl` (systemd)
  3. Aufgaben mit Shell-Funktionen automatisieren
  4. Zentrales Logging und Rotation mit journald und logrotate
← Zurück zu Linux Command Line Mastery