Changing the commandline prompt of Anaconda - windows

Instead of the commandline prompt provided by MS Windows, I want to use Bash
I have done enough websearch but it did not give me any exact solution

What worked for me with similar case is MobaXterm terminal for Windows, you just need to enable option "use Windows PATH" from it's Terminal Settings and ensure that you have Anaconda in your Windows PATH.
With the above approach you can run all conda commands from a local Bash Terminal on Windows with Basic Cygwin commands.
I hope this is similar with what you are looking for.

Related

How do you make .sh or .bash files open with Windows Terminal Ubuntu?

I really like coding in bash, but there used to be many limitations of bash functionality in Windows. Though now there are many benefits to the bash windows users now rather than how it was pre windows 10. However, with all of the improvements, there is one thing that I feel leaves to be desired for me. The default behavior of the double-click of .sh files never really was able to do anything in windows, the .sh file extension isn't even available in the "choose default apps by file type" section of the settings. I had a desire to be able to change the default action for .sh files but neglected it and shook it off for a while, but this link finally gave me hope.
Before Ubuntu terminal and the addition of Windows subsystem for Linux, there was really no way to access bash terminal on Windows without a VM. Now with the addition of Windows Terminal which combines Microsoft Azure Terminal, Command Prompt, Powershell, and Ubuntu, it is really awesome for people like me, but despite the new awesome additions to windows allowing further integration of Linux terminal into Windows, even being able to edit the C: drive with Ubuntu.
I am sure there is a way to allow double-click of .sh files to open in windows terminal Ubuntu, but I don't know how. This question helped me on my journey to figure out how to do it and helped me make the default .bat file behavior change to Windows terminal, but I still have come to an enpass where I truly believe that it is not possible. So here is where I go when I have given up, the magical land of Stack Overflow :)
Attempts
So far I have looked into the "Choose default apps by file extension" section of settings and could not find .sh in there nor could I find it in any of the default apps sections of normal settings.
After I couldn't find anything about .sh in settings, I looked into the registry and looked for HKEY_CLASSES_ROOT and looked for sh or anything bash file related in HCR alone, HCR\*\shell, HCR\*\shellx, and HCR\*\Openwithlist and could not find anything.
I then tried to do ftype, but I could not find how to use ftype with .sh. I tried doing ftype .sh="C:\Users\asian\AppData\Local\Microsoft\WindowsApps\wt.exe" -p "Ubuntu" "%1" %* but i got the error "File type '.sh' not found or no open command associated with it."
I Also tried just clicking the .sh file so it brings up the "How do you want to open this file" menu and went to Windows Terminal but it opened the bash file in powershell with the error [error 0x800700c1 when launching `C:\Users\asian\Desktop\test.sh']
These where everything I could think of and none of it was working. Help and pointers are appreciated. Thank you!
I suggest you install the Git for Windows package, as it comes with a light-weight bash environment. This is likely to be able to be in the list of available apps when right-click -> Properties on a .sh or .bash file and say Open With and click the Change button next to Open With.
Other options are Cygwin or WSL for a 95% pure Linux environment on Windows.

adb: command not found- Window 10 shell

I am trying to run the adb command using adb shell. Running well on mac but not in the window.
Add the path to the folder containing adb.exe to the PATH environment variable. If you don't have adb.exe in your computer, download one.
(Off topic) Besides, you seems trying to run a Linux shell script on Windows, please use some software like Cygwin or MSYS2.

Alternative command for Vi/Cat in Windows 7

In Unix/Linux we are having vi & cat command to view or edit a file. There are any alternative command to view/edit a file in windows command prompt.
Cygwin is a large collection of GNU and Open Source tools which provide functionality similar to a Linux distribution on Windows.
It includes both cat and vi.
It is possible to select which parts of Cygwin to install. See Installing and Updating Cygwin Packages for more instructions.
There is a edit on windows but it doesn't work on 64Bit machine. So alternate solution is given below.
Just download vim for windows from Here (direct download link), on the installation it will ask if you want to create shortcuts for calling it from the command line. Then you can just vim
For Windows, To view the filename use, Type filename

Anyone know how to put a Cygwin term in the context menu

I would like to put a Cygwin terminal menu item on a Windows 7 context menu.
But I would like the shell to open at the folder.
chere -i is supposed to do something like it but ends up giving a bash shell that does NOT have my profiles loaded.
Anyone know how to acheive this?
You can try chere -i -t mintty. It worked for me, as it defines which terminal type to bring up, and in my case, (I'm running 64 bit windows 7) mintty seems to load my profiles.
Since you have already tried chere -i, you have to uninstall it first, using chere -u, then run the above command chere -i -t mintty.
Bare in mind, that on my work laptop, I had to run cygwin as administrator for this to work (I believe chere modifies the registry at some point). But it worked on my home PC flawlessly without administrator privileges.
Other people also claim some success following this blog post, http://with-love-from-siberia.blogspot.co.uk/2013/12/cygwin-here.html which shows how to use a windows batch file to modify the registry to add the option to the folder context menu.

Mr.Developer couldn't find 'git' exec on my path. I have Windows/msysgit

I get the error from mr. developer: "Couldn't find 'git' executable on your PATH."
I'm running msysgit on Windows 7 and I believe I have the latest Mr. Developer. Any ideas?
You could copy git.exe to git with no file extension ,then the problem could be solved. The clue is found by the link provided by Chis.
For my case, I use the portable version of msysgit since I wanted full control of the set up and installation.
In README.portable, you'll read the following
How to start using PortableGit
If you are comfortable with a Unix-like shell, just launch
'git-bash.bat'.
If not, just launch 'git-cmd.bat'.
Alternatively, you can execute these commands to modify the %path%
variable temporarily:
set gitdir=c:\portablegit
set path=%gitdir%\cmd;%path%
Adjust the 'gitdir' according to your setup. As long as you do not
close the command window, you can now simply type "git" or "gitk" to
really call "c:\portablegit\cmd\git.cmd" or
"c:\portablegit\cmd\gitk.cmd".
Personally, I run the shell by invoking git-cmd.bat so that I'll gain access on unix commands, like ls, mv, etc.
Make sure your System PATH includes your msysgit directory, assuming you've installed and built it correctly.

Resources