Sia Docs
GithubDiscordYouTubeBlogsRedditForum
Legacy
Legacy
  • Welcome to Sia!
  • Get Started with Sia
    • Introduction to these docs
    • Sia 101
    • What are Siacoins?
    • How to buy Siacoins
    • What is the Siacoin total supply?
  • Your Sia Wallet
    • Wallet overview
    • The importance of your seed
    • How to make a Sia address
    • How to send Siacoins
    • How do I change my Sia wallet password?
    • Back up your Sia wallet
    • Wallet troubleshooting
      • Delete your seed and make a new one
      • Find or fix your seed
      • I lost my seed. What do I do?
      • My deposit or withdrawal didn't go through
      • Why does Sia take so long to sync?
      • What are these deductions in my wallet?
      • Why does Sia-UI give me a new address each time I click Receive Siacoin?
    • Sia-UI FAQs
      • How to download and install Sia-UI
      • How to make a new wallet in Sia-UI
      • How to restore a wallet from a seed in Sia-UI
      • How to perform a clean install in Sia-UI
      • How do I uninstall Sia-UI?
    • For Advanced Users
      • Verify the Sia release signature
      • Using Sia on a remote node
      • Using Sia on multiple computers
      • How to bootstrap the Sia blockchain
      • How to automatically restart and unlock Sia
      • How to set an environment variable
    • 🚧walletd
      • Wallet overview
  • Renting
    • About renting on Sia
    • Managing your files
    • How to rent storage on Sia
    • How to back up and restore your files
    • Renter troubleshooting
    • Is my data secure?
    • 🚧renterd
      • About renting on Sia
      • renterd Workshop
  • Hosting
    • About hosting on Sia
    • Hosting with the Sia-UI GUI
    • Hosting with the siad CLI on Linux
    • Hosting FAQ
    • 🚧hostd
      • About hosting on Sia
      • Setup Guides
        • Linux
        • macOS
        • Windows
      • Dynamic DNS
        • DuckDNS
        • Cloudflare (Advanced)
  • Mining
    • About mining on Sia
    • Sia mining pools
  • Contributing
    • How can I contribute to Sia?
    • Where can I learn more about Sia?
  • Siafunds
    • What are Siafunds?
    • How do I buy Siafunds?
    • How to cash out Siafunds
    • SEC Settlement FAQ
  • Sia Integrations
    • Listing Siacoin on your exchange
    • Using the Sia Ledger app with Sia Central
    • Using the Sia Ledger Nano app with CLI
    • Brand guidelines for Sia in your project or site
  • Testnet
    • What is Zen?
  • Forks
    • Using the wrong chain after a fork
    • Navigating the 2021 Sia hardfork
    • So, you didn't update in time for the fork
Powered by GitBook
On this page
  • Linux
  • Windows
  • Windows 8 and Windows 10
  • Windows 7
  • macOS
  • OS X 10.10
  • Newer version of macOS

Was this helpful?

Edit on GitHub
  1. Your Sia Wallet
  2. For Advanced Users

How to set an environment variable

Linux

To set an environment variable on Linux, enter the following command at a shell prompt, according to which shell you are using:

csh/tcsh: variablevalue bash/ksh: variable=value

where variable is the name of the environment variable (such as ) and value is the value you want to assign to the variable, (such as ). To find out what environment variables are set, use the command. To remove a variable from the environment, use the following commands:

csh/tcsh: variable_bash/ksh: _variable

Windows

You can create or change environment variables in the Environment Variables dialog box. If you are adding to the PATH environment variable, or any environment variable that takes multiple values, you should separate each value with a semicolon (;).

Windows 8 and Windows 10

To open the Environment Variables dialog box:

  1. In Search, search for and then select: Edit environment variables for your account

To create a new environment variable:

  1. In the User variables section, click New. The New User Variable dialog box opens.

  2. Enter the name of the variable and its value, and click OK. The New User Variable dialog box closes, and the variable is added to the User variables section of the Environment Variables dialog box.

  3. Click OK in the Environment Variables dialog box.

To modify an existing environment variable:

  1. In the User variables section, select the environment variable you want to modify.

  2. Click Edit. The Edit User Variable dialog box opens.

  3. Change the value of the variable and click OK. The Edit User Variable dialog box closes, and the variable is updated in the User variables section of the Environment Variables dialog box.

When you have finished creating or editing environment variables, click OK in the Environment Variables dialog box to save the values.

Windows 7

To open the Environment Variables dialog box:

  1. Click Start, then click Control Panel. The Control Panel opens.

  2. Click User Accounts.

  3. Click User Accounts again.

  4. In the Task side pane on the left, click Change my environment variables. The Environment Variables dialog box opens.

To create a new environment variable:

  1. In the User variables section, click New. The New User Variable dialog box opens.

  2. Enter the name of the variable and its value, and click OK. The New User Variable dialog box closes, and the variable is added to the User variables section of the Environment Variables dialog box.

  3. Click OK in the Environment Variables dialog box.

To modify an existing environment variable:

  1. In the User variables section, select the environment variable you want to modify.

  2. Click Edit. The Edit User Variable dialog box opens.

  3. Change the value of the variable and click OK. The Edit User Variable dialog box closes, and the variable is updated in the User variables section of the Environment Variables dialog box.

When you have finished creating or editing environment variables, click OK in the Environment Variables dialog box to save the values. You can then close the Control Panel.

macOS

To set an environment variable on Mac OSX, first open a terminal window.If you are setting the environment variable to run jobs from the command line, use the following command:

export variable=value

where variable is the name of the environment variable (such as ) and value is the value you want to assign to the variable, (such as ). You can find out which environment variables have been set with the command.

If you are setting the environment variable globally to use with applications, use the commands given below. The environment variables set by these commands are inherited by any shell or application.

OS X 10.10

To set an environment variable, enter the following command:

launchctl setenv variable "value"

To find out if an environment variable is set, use the following command:

launchctl getenv variable

To clear an environment variable, use the following command:

launchctl unsetenv variable

Newer version of macOS

PreviousHow to automatically restart and unlock SiaNextwalletd

Last updated 1 year ago

Was this helpful?

See for instructions on how to create a "plist" file to store system-wide environment variables in newer versions of macOS.

Thanks to for the content of this article.

this article
Schrodinger.com