LinuxCommandLibrary

systemctl-link

Link external unit files to systemd

TLDR

Link unit file

$ systemctl link [path/to/unit.service]
copy
Link multiple unit files
$ systemctl link [path/to/unit1.service path/to/unit2.service ...]
copy

SYNOPSIS

systemctl link PATH...

DESCRIPTION

systemctl link creates a symbolic link in the unit file search path pointing to a unit file located elsewhere. This makes the unit available to systemd commands without copying the file.
The link is created in `/etc/systemd/system/` (or the user equivalent with `--user`). The original file must be an absolute path.

CAVEATS

The linked file must remain in place; removing it breaks the link. Use `systemctl disable` to remove the link. The linked unit is not automatically enabled; use `systemctl enable` after linking to start at boot.

HISTORY

The link subcommand allows testing or using unit files stored outside standard locations, useful during development or when unit files are managed by external configuration management systems.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community