DEV Community

Zhangwuji
Zhangwuji

Posted on

cmd and powershell

in windows os
how to set cmd environment variable?

set fff = 1
Enter fullscreen mode Exit fullscreen mode

how to set environment variable in powershell?

$env:RUST_BACKTRACE = "1"
Enter fullscreen mode Exit fullscreen mode

how to output all environment variable into console in powershell?

gci Env:
Enter fullscreen mode Exit fullscreen mode

how to output all environment variable into console in cmd?

set
Enter fullscreen mode Exit fullscreen mode

the mothods bellow just make environment variable live in one powershell or cmd ? when you close it. they will be destroied。

Top comments (0)