Translated message

A translation of this page exists in English.

systemd ユニットファイルにカスタム環境変数を渡す方法

Solution In Progress - Updated -

Issue

  • systemd ユニットファイル定義で、カスタム環境変数を渡すことができません。

    Environment="VAR1=VALUE1"
    Environment="VAR2=$VAR1 VALUE2" 
    
  • 変数 $VAR1 は、正しい値 (VALUE1) で解決されません。

  • EnvironmentFile を使用しても、環境変数 $VAR1 の値が解決されませんでした。

Environment

  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9
  • Systemd

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content