Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMD cheatsheet #4

Open
jinsanity07git opened this issue Mar 27, 2024 · 0 comments
Open

CMD cheatsheet #4

jinsanity07git opened this issue Mar 27, 2024 · 0 comments

Comments

@jinsanity07git
Copy link
Owner

jinsanity07git commented Mar 27, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant