1

Is there something like a profile that will activate mamba/conda automatically when I launch a command (cmd.exe) terminal in Windows?

I am using the new Windows terminal and also use WSL and Powershell there as well. I looked in the settings and I didn't see any option to run a command or script at startup.

abalter
  • 9,663
  • 17
  • 90
  • 145
  • I suggest reading my answer on [How to change directory with BAT file?](https://stackoverflow.com/questions/61132002/how-to-change-directory-with-bat-file) It explains in full details how to create a shortcut file which runs `cmd.exe` with opening a console window with the properties you like, calls the batch file `activate.bat` of Anaconda 3 to setup the environment and keep `cmd.exe` running for commands entered by you. Such a shortcut file can be created for any usage of the Windows Command Processor with activation of a specific environment, not only for Anaconda 3. – Mofi Apr 22 '23 at 20:03

1 Answers1

0

Sounds like you're looking for something like: Adding profiles for third-party tools / Anaconda

{
    "commandline": "cmd.exe /k \"%USERPROFILE%\\Anaconda3\\Scripts\\activate.bat %USERPROFILE%\\Anaconda3\"",
    "icon": "%USERPROFILE%\\Anaconda3\\Menu\\anaconda-navigator.ico",
    "name": "Anaconda3",
    "startingDirectory": "%USERPROFILE%"
}
zadjii
  • 529
  • 2
  • 4