Actions
-
open the current directory:
start .
-
use the
help
command followed by the name of the command:help dir
-
Windows command line search for exact extension with dir 1:
dir /s /b *.txt | findstr /v .txt.
Lookup
Commands(windows) | Short description | Equivalent PowerShell |
macOS |
---|---|---|---|
START | Start a program, command or batch file • | Invoke-Item Start-Process |
open |
DEL | Delete one or more files • | rm | |
DIR | Display a list of files and folders • | ls | |
HELP | Online Help | Get-Help | man |
System Environment Variable
Set the Environment Variable:
Open Command Prompt as Administrator: Press Windows
+ X
and select “Command Prompt (Admin)” or “Windows PowerShell (Admin)” to open a terminal with administrator privileges.
$Env:PATH
nicely printed
$Env:PATH -split ';' | ForEach-Object { $_ }
for %G in ("%PATH:;=" "%") do @echo %G
with filter
for %G in ("%PATH:;=" "%") do @echo %G | find "conda"
Set the Environment Variable: You can use the setx
command to add the directory containing conda.bat
to your system's Path
environment variable. The command format is as follows:
setx PATH "%PATH%;C:\ProgramData\anaconda3\condabin"
Remove a PATH
-
You can do this through the System Properties dialog (search for "Edit the system environment variables")
- Press
Windows Key + R
to open the Run dialog.- OR open
CMD
windown
- OR open
- Type
sysdm.cpl
and pressEnter
or clickOK
. - This command opens the System Properties dialog directly.
From there, you can navigate to theAdvanced
tab
and click onEnvironment Variables
to edit, add, or delete system and user environment variables.
Another method to directly reach the Environment Variables window is:
- Press
Windows Key + R
to open the Run dialog. - Type
rundll32 sysdm.cpl,EditEnvironmentVariables
and pressEnter
or clickOK
.
- Press
FAQ:
- conda cannot activate env in PowerShell2