Skip to content

CMD cheatsheet #4

Open
Open
@jinsanity07git

Description

@jinsanity07git

Actions

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
    • Type sysdm.cpl and press Enter or click OK.
    • This command opens the System Properties dialog directly.
      From there, you can navigate to the Advanced tab
      and click on Environment Variables to edit, add, or delete system and user environment variables.

    Another method to directly reach the Environment Variables window is:

    1. Press Windows Key + R to open the Run dialog.
    2. Type rundll32 sysdm.cpl,EditEnvironmentVariables and press Enter or click OK.

FAQ:

  • conda cannot activate env in PowerShell2

References

Footnotes

  1. DIR Display a list of files and folders •

  2. https://github.com/jinsanity07git/jinsanity07git.github.io/issues/9

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions