systemctl

Linux · System · available in the simulator

What it does

Control system services and units managed by systemd.

Syntax

systemctl [subcomando] [unidad]

Options and parameters

  • start

    Subcommand: Start the service.

    sudo systemctl start nginx
  • stop

    Subcommand: Stop the service.

  • restart

    Subcommand: Restart the service.

  • reload

    Subcommand: Reload configuration without restarting.

  • status

    Subcommand: Show status and recent log entries.

    systemctl status nginx
  • enable

    Subcommand: Enable the service to start at boot.

    sudo systemctl enable nginx
  • disable

    Subcommand: Disable the service from starting at boot.

  • list-units

    Subcommand: List loaded units.

  • --now

    When used with enable or disable, apply the change immediately.

Usage examples

  • sudo systemctl start nginx
  • systemctl status nginx
  • sudo systemctl enable nginx
Practise systemctl

Related commands