← 返回命令列表

Linux command

systemctl-unset-environment 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Unset

systemctl unset-environment [VAR]

Example

systemctl unset-environment [VAR1 VAR2 ...]

Example

systemctl unset-environment [VAR] --user

说明

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.

参数

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

FAQ

What is the systemctl-unset-environment command used for?

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.

How do I run a basic systemctl-unset-environment example?

Run `systemctl unset-environment [VAR]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --user do in systemctl-unset-environment?

Unset in user service manager environment