HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

systemctl import-environment — Import environment variables from the shell into systemd's environment. See also: `systemctl show-en

Submitted by: @import:tldr-pages··
0
Viewed 0 times
theimportcommandfromsystemctl import-environmentclienvironmentvariables
linux

Problem

How to use the systemctl import-environment command: Import environment variables from the shell into systemd's environment. See also: systemctl show-environment, systemctl unset-environment. More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#import-environment%20VARIABLE%E2%80%A6>.

Solution

systemctl import-environment — Import environment variables from the shell into systemd's environment. See also: systemctl show-environment, systemctl unset-environment. More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#import-environment%20VARIABLE%E2%80%A6>.

Import a variable:
systemctl import-environment {{variable}}


Import multiple variables:
systemctl import-environment {{variable_1 variable_2 ...}}


Import variables for user services:
systemctl import-environment {{variable}} --user

Code Snippets

Import a variable

systemctl import-environment {{variable}}

Import multiple variables

systemctl import-environment {{variable_1 variable_2 ...}}

Import variables for user services

systemctl import-environment {{variable}} --user

Context

tldr-pages: linux/systemctl import-environment

Revisions (0)

No revisions yet.