LinuxCommandLibrary

systemctl-start

Start a systemd service

TLDR

Start a unit

$ systemctl start [unit]
copy

SYNOPSIS

systemctl start [OPTIONS...] UNIT...

PARAMETERS

UNIT...
    Specifies one or more systemd units (e.g., `apache2.service`, `network.target`) to activate and start. The `.service` suffix is often optional for service units.

--no-block
    Does not wait for the operation to complete. The command returns immediately, allowing for parallel execution or non-blocking scripting.

--dry-run
    Performs a "dry run" by showing what actions would be taken without actually executing them. Useful for verifying dependencies and potential conflicts.

--quiet or -q
    Suppresses most output, showing only errors or critical information.

--user
    Connects to the systemd user instance for the current user, managing user-specific services.

--system
    Connects to the systemd system instance (the default), managing system-wide services.

DESCRIPTION

systemctl start is a fundamental command within the systemd init system, used to immediately activate and run one or more specified units. A unit can be a service (like a web server or database), a mount point, a socket, or various other components managed by systemd.

When you issue this command, systemd resolves any necessary dependencies, brings the unit into an "active" state, and executes its defined start-up sequence. This action is transient; it starts the unit for the current session but does not automatically configure it to start again after a reboot. For persistent activation across reboots, the `systemctl enable` command is used in conjunction with `start` or separately.

The command typically requires root privileges for system-wide units and is essential for managing the operational state of services on modern Linux distributions.

CAVEATS

  • Starting system-wide units typically requires root privileges.
  • `systemctl start` only activates units for the current session; it does not configure them to start automatically on boot. Use `systemctl enable` for persistent activation.
  • If a unit fails to start, investigate its logs using `journalctl -u ` for troubleshooting.
  • Using `--no-block` can make it harder to immediately detect start-up failures, as the command returns before the unit is fully operational.

UNIT TYPES

systemd manages various unit types, not just services (`.service`). Other common types include `socket`, `mount`, `automount`, `device`, `target`, `path`, `timer`, and `swap`. While `systemctl start` can apply to many of these, it's most frequently used with `.service` units.

UNIT FILE NAMING

When referring to a unit, you can often omit the suffix (e.g., `nginx` instead of `nginx.service`) as systemd is usually smart enough to infer it, especially for services. However, it's good practice to include the suffix for clarity or when ambiguity might exist.

HISTORY

The `systemctl` command is an integral part of systemd, the init system developed by Lennart Poettering and Kay Sievers. systemd began development around 2010 and rapidly gained adoption, replacing the traditional SysVinit system as the default init system in major Linux distributions like Fedora (2011), RHEL, Debian (2014), and Ubuntu (2015). `systemctl start` provides a modern, unified, and more efficient interface for managing services compared to the previous fragmented methods involving `service` scripts or direct calls to init scripts in `/etc/init.d/`. Its design leverages parallelization and dependency management for faster boot times and more robust service control.

SEE ALSO

systemctl enable(1), systemctl stop(1), systemctl restart(1), systemctl status(1), journalctl(1), systemd.unit(5)

Copied to clipboard