Actions
-
open the current directory:
start . -
use the
helpcommand 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:PATHnicely printed
$Env:PATH -split ';' | ForEach-Object { $_ }for %G in ("%PATH:;=" "%") do @echo %Gwith 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 + Rto open the Run dialog.- OR open
CMDwindown
- OR open
- Type
sysdm.cpland pressEnteror clickOK. - This command opens the System Properties dialog directly.
From there, you can navigate to theAdvancedtab
and click onEnvironment Variablesto edit, add, or delete system and user environment variables.
Another method to directly reach the Environment Variables window is:
- Press
Windows Key + Rto open the Run dialog. - Type
rundll32 sysdm.cpl,EditEnvironmentVariablesand pressEnteror clickOK.
- Press
FAQ:
- conda cannot activate env in PowerShell2