LinuxCommandLibrary

systemctl-unset-environment

Remove service manager environment variables

TLDR

Unset environment variable

$ systemctl unset-environment [VAR]
copy
Unset multiple variables
$ systemctl unset-environment [VAR1 VAR2 ...]
copy
Unset in user manager
$ systemctl unset-environment [VAR] --user
copy

SYNOPSIS

systemctl unset-environment VARIABLE...

DESCRIPTION

systemctl unset-environment removes environment variables from the systemd service manager's environment. This undoes the effect of `systemctl set-environment`.
Services started after the unset will not receive the removed variables.

PARAMETERS

--user

Unset in user service manager environment
--system
Unset in system manager environment (default)

CAVEATS

Only affects services started after the change. Already running services keep their environment. Changes are temporary and lost on reboot.

HISTORY

The unset-environment subcommand complements `set-environment`, providing complete runtime control over the service manager's environment.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community