0% found this document useful (0 votes)
140 views1 page

Linux - Equivalent of Export Command in Windows - Super User

This Super User post discusses the equivalent commands for export in Windows command prompt. The key points are: 1) The export command is Unix/Linux specific, while the equivalent in Windows is setx. 2) setx can be used to set environment variables that will be available in the current and future command prompts. 3) To access the environment variable, use %VariableName% syntax in Windows instead of $VariableName as in Unix/Linux.

Uploaded by

Penjelajah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
140 views1 page

Linux - Equivalent of Export Command in Windows - Super User

This Super User post discusses the equivalent commands for export in Windows command prompt. The key points are: 1) The export command is Unix/Linux specific, while the equivalent in Windows is setx. 2) setx can be used to set environment variables that will be available in the current and future command prompts. 3) To access the environment variable, use %VariableName% syntax in Windows instead of $VariableName as in Unix/Linux.

Uploaded by

Penjelajah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Search on Super User… Log in Sign up

Anybody can ask a question


Super User is a question and answer site for
computer enthusiasts and power users. It only
takes a minute to sign up. Anybody can answer

Sign up to join this community


The best answers are voted up and
rise to the top

Home
Equivalent of export command in Windows Ask Question

Questions Asked 4 years ago Modified 2 years, 1 month ago Viewed 87k times

Tags
I am following a documentation and executing some commands in Windows 10 command
The Overflow Blog
prompt:
Users
15 CEO update: Giving thanks and building
Companies export OPENAI_LOG_FORMAT='stdout,log,csv,tensorboard' upon our product & engineering
export OPENAI_LOGDIR=path/to/tensorboard/data foundation
Unanswered
The AI assistant trained on your
tensorboard --logdir=$OPENAI_LOGDIR
company’s data
TEAMS

Stack Overflow for I have figured that export is a Unix command and the equivalent in Windows is setx . I Featured on Meta
Teams – Start have executed the first two commands and when I tried the third command,
collaborating and Update: New Colors Launched
$OPENAI_LOGDIR is not properly detected. Can someone help with the equivalent of these in
sharing organizational
knowledge. Windows? Incident update and uptime reporting

linux windows-10 command-line bash export


Linked

409 What are PATH and other environment


Share Improve this question edited Feb 29, 2020 at 13:58 asked Nov 8, 2019 at 12:36 variables, and how can I set or use them?
Follow phuclv singh adi
2 Windows equivalent of $ in unix commands
26.9k 15 117 237 161 1 1 3

Related
if running script under cmd.exe use %<EnvVarName> to reference it: echo %OPENAI_LOG_FORMAT
– TWI Nov 8, 2019 at 13:18 21 Exit program in windows command prompt

setx OPENAI_LOG_FORMAT 'stdout,log,csv,tensorboard' makes a "user variable" setx 19 Windows equivalent of SSH
OPENAI_LOG_FORMAT 'stdout,log,csv,tensorboard' /m makes a "system variable". Note: No equal
sign is used. Variables created with setx /m will be available in the next cmd window you open but 1 defrag command line in Windows 7
will not be available in the current window. Use setx if you want the variable to be available in the
current window. – somebadhat Nov 8, 2019 at 14:07 0 Ubuntu equivalent command to Windows
tasklist command
Hi I understood about the setx, how do I access that variable for the third command.
$OPENAI_LOGDIR is not fetching the variable value – singh adi Nov 9, 2019 at 5:20 1 How to save last execution of my command
in Windows 10 Command Prompt?
2 TWI is unfortunately not entirely correct. In cmd , the syntax is %VariableName% . So,
1 VBoxManage Linux command
%OPENAI_LOGDIR% . Also, you might want to consider set instead of setx , depending on your
convertfromraw equivalent for Windows
use case. – Daniel B Nov 14, 2019 at 20:01
1 export mpicc in a bash script (for
you said that it's not working but you didn't show your code. You must show what you've tried
OpenFoam)
– phuclv Feb 29, 2020 at 4:12
2 Windows equivalent of $ in unix commands
Show 1 more comment

Hot Network Questions


3 Answers Sorted by: Highest score (default)
BOSCH 26A16A ICON Beam Wiper Blades - Driver
and Passenger Side
you can try this:
Dual citizen & traveling out of a Schengen area
country with a foreign passport
in PowerShell
13 Has there been any significant pro-Palestinian
protest critical of Hamas?
$env:OPENAI_LOGDIR="path/to/tensorboard/data"
How to fit function with data?

Is there any way to legally sleep in your car while


in cmd drunk?

Could the human body feel the sudden


set OPENAI_LOGDIR=path/to/tensorboard/data disappearance or end of a gravitational force?

How can I keep large packs of ham fresh longer?

Freehub body (plus cassette) fell off


Share Improve this answer edited Sep 22, 2021 at 11:49 answered Apr 22, 2020 at 1:52
Follow michaelgrigoryan25 Mariem Jab Is "it is looking good" slang?
156 1 7 131 1 2
a Gutter or Sewer?
Add a comment
Does a proof by induction have to explicitly refer
to the principle of mathematical induction?

setx is not the counterpart of Linux export in Windows. export just makes the variable The Monty Hall loot box
available temporarily to the current shell and its children processes whereas setx stores the Sci-fi, mid-grade/YA novel about a girl in a
11 variable permanently to every user or system process in the future. wheelchair beta testing the world's first fully
immersive VR program

You didn't show all the real commands you used so based on the comments I guess you ran Can an Adult Gold Dragon Turn into a Goblinoid
Creature?
these
Can you completely determine a finitely presented
finite group?
setx OPENAI_LOG_FORMAT 'stdout,log,csv,tensorboard'
setx OPENAI_LOGDIR path/to/tensorboard/data Inkscape - how to (re)name symbols in 1.3?
tensorboard --logdir=$OPENAI_LOGDIR How can I overcome irrational fears of being out in
the dark?

which is absolutely wrong Was Starship’s “launch window” bureaucratic,


rather than physical?

First setx is supposed to be run only once, thus if you want to set the environment for the Solving underdetermined Lyapunov equation?

current session then you must use set instead of setx . If you do want to set the variable What are these "fountains" during the deluge for
permanently then you'll still need to restart the shell so the changes apply, and never run the the Super Heavy launch?

command again Who hugely misunderstood the sentence "Do you


feel like breakfast ?"

Besides single quote isn't a quoting character in cmd so you'll need to remove '' and use How important is getting nitty-gritty with ideals
stdout,log,csv,tensorboard , or "stdout,log,csv,tensorboard" if your program does for algebraic number theory?

quote removal by itself No space left in device - Empty USB drive

A question about a phrase in "The Light Fantastic",


And lastly, variables in cmd are accessed with %% instead of $ like bash, hence you must Discworld #2 by Pratchett
change the last line to tensorboard --logdir=%OPENAI_LOGDIR%
Question feed
This is still a guess until you provide enough information in the question

Share Improve this answer Follow answered Feb 29, 2020 at 4:12
phuclv
26.9k 15 117 237

Add a comment

Open your computer

1. Search for this PC icon


0
2. Click on with the right button than choose properties.

3. Click on Advanced System Settings (left part)

4. Click on Environment Variables (right-down)

5. Add a new system variable and save the changes

Now it will work for all users. To test open the cmd and type echo %your_variable%

for more information, see What are PATH and other environment variables, and how can I set
or use them?

Share Improve this answer Follow answered Nov 14, 2019 at 19:55
Mauro Matsudo
41 5

3 There’s no need to create persistent environment variables for everything. – Daniel B Nov 14, 2019 at
19:59

Add a comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged linux windows-10

command-line bash export .

SUPER USER COMPANY STACK EXCHANGE NETWORK Blog Facebook Twitter LinkedIn Instagram

Tour Stack Overflow Technology


Help Teams Culture & recreation
Chat Advertising Life & arts
Contact Collectives Science
Feedback Talent Professional
About Business
Press
API
Legal
Data
Privacy Policy
Terms of Service
Cookie Settings
Site design / logo © 2023 Stack Exchange Inc; user contributions licensed
Cookie Policy under CC BY-SA. rev 2023.11.15.1019

You might also like