I am a beginniner user of Julia. According to the webpage of the Julia Programming Language, "We highly recommend running Julia using a modern terminal, such as installing the Windows Terminal from the Microsoft Store" (Julia 1.6 for Windows). In fact, PowerShell handles the Julia fonts in a better way.
However, the installation of Julia generates a start menu item that runs under cmd as default. How can I create run Julia so that it uses PowerShell as default?
I don't know if it is possible
You can add your julia installation folder to the PATH so that julia opens julia in Powershell
Or, if you want to be able to have multiple versions and chose which one to launch, you can use PowerShell aliases in $profile:
New-Alias julia1.6.0 C:\\Users\\user\\AppData\\Local\\Programs\\Julia-1.6.0\\bin\\julia.exe
New-Alias julia1.5.3 C:\\Users\\user\\AppData\\Local\\Programs\\Julia-1.5.3\\bin\\julia.exe
New-Alias julia julia1.6.0
to see where it is and edit it:
echo $profile
notepad $profile
I strongly recommend the Open Source ConEmu.
Set your Windows Julia shortcut to (this assumes that the folder with julia.exe is in your system PATH environment variable):
"C:\Program Files\ConEmu\ConEmu64.exe" -run julia
you can not get better Windows user experience than that :-)
Related
I currently use MINGW64 (Git Bash) as my terminal on my Windows 10 machine. It works great, I like it, but it only has Vim installed as an editor and I prefer Emacs. I'm unfortunately having a really awful time getting it to work in my terminal.
What's weirder still is that I have Emacs working in Cygwin64; but I don't like using that as my terminal. The most logical fix is simply that it Emacs to my Path ENV, however that doesn't seem to help (perhaps I'm doing that wrong?). I just get bash: emacs: command not found. I found a command to install it, using Pacman, however the Pacman command cannot be found either (which is weird because I thought that was installed by default with MINGW64.
Would love any and all help on this.
A couple of options:
Use Cygwin and the Cygwin emacs. Consider your Cygwin environment completely separate from Windows, so set your PATH from within the .bashrc, not within Windows. Launch emacs from the bash command-line.
Use the Emacs Windows binary distribution, but point to the utilities within Cygwin (there's an emacs package to help with this). Again, launch from the bash command line to inherit the bash environment within emacs.
Use the Windows Subsystem for Linux, with a Linux installation, and stick with emacs from there. You get the best of the Linux world, and access to the Windows directories and files as well.
My goto choice for MANY years was the Emacs Windows binary in conjunction with Cygwin. Once I started using the WSL, however, it just worked a lot better, in a clean Linux environment, and I could get terminal and GUI emacs (and other apps) running using the VcXsrv X Server. WSL has a version that directly supports X Windows, but I don't care for the windowing environment it uses, so I stick with VcXsrv.
I am been currently studying AWS, and my online instructor uses "Windows PowerShell", however, I have always used "Hyper Terminal" for MERN stack. What is the difference between the two, and what sets this two apart from the Command Prompt?
Here is the simple answer:
PowerShell Preview replaced PowerShell, and PowerShell replaced Command Prompt (CMD).
Windows Terminal is an application that simply provides tabs to open multiple instances of PowerShell (Preview or legacy) and Command Prompt, as well as Azure cloud shell.
In Linux. you'll often hear the terms 'terminal' and 'console' used interchangeably, but they mean the same in Linux as they do in Windows. That is, console is the Linux alternative to the DOS style command prompt.
I am not familiar with Hyper Terminal but I see there are terminal emulators online that go by that name therefore I assume you may be using a third party terminal emulator.
PowerShell is a newer shell and also happens to be an object-oriented scripting language.
As far as Windows shells go, I can use PowerShell to do anything I used to do with CMD. Generally speaking, I would say PowerShell really shines when it comes to Windows System administration which is my primary use for it and it saves me a great deal of time.
As far as terminal emulators go, I feel the default terminals for both PowerShell and CMD are pretty much the same and are very lacking compared to 3rd party offerings or even the default terminal that comes in any modern Linux OS.
For a free "Microsoft" alternative to replace your default terminal, I would recommend the open-source "Windows Terminal" app. The addition of tabs, panes, zoom function, easy to read text, and easy ways to start different shells (such and CMD or PowerShell) or even start a WSL session with your choice of Linux OS is a major improvement to the default Windows terminal app.
I am using Windows 10 and want to set the the default VSCode interpreter for Python to be the same one used in my WSL 2 (Ubuntu), so that I'm always using "one Python".
When I click "Select Python interpreter" a prompt appears to find the interpreter path, but I'm not sure what the path would be.
I think that, in order to use the WSL python, you need to be running VSCode in a WSL remote window. You need to install the Remote WSL extension first. Then, on the lower left there is a green button that will let you start a WSL window, or it will tell you that you are already in one.
If you are in a WSL window, you should be able to select your python interpreter pretty easily. It will either automatically detect it, or you can run which python3 in an Ubuntu terminal to get the path. If you want to navigate to a file on your Windows file system from within this window, look in, e.g., /mnt/c/Users/<USER_NAME>.
Well probably late to the party but you can find Python you are using on your WSL2 with simple command:
which python3
It will show you where is the python placed.
While above answers work, there are some related things to keep in mind here (or are at least worth mentioning):
I would recommend to create a virtual environment for your project. If you do so, its very easy to find the python interpreter in the bin folder of the venv. (If you want to "find" your WSL folder in windows. Just enter explorer.exe . in your terminal - it will open a windows explorer in the current location.
If you open the python interpreter selector form within VS Code on Windows, be aware that it opens a windows that let's you select "Executables" (meaning WINDOWS wxecutables):
You will not be able to open your python interpreter located in your wsl like that, as the folder will be shown as empty.
I'm a big fan of powershell ISE as a terminal. It has intellisense and syntax highlighting built in the shell and I just use it instead of the regular shell for everyday commands.
I would like to use Visual Studio Code instead, because the editor is much more powerfull and has support for a whole lot of languages and format. However the integrated shell is you basic Powershell terminal : no intellisense, no coloring (even with Powershell 5 installed on my computer).
Is there any way to add intellisense and coloring to my terminal, or use ISE's terminal in VSCode? or is there a plugin somewhere adressing these issues?
The integrated PowerShell terminal on Visual Studio Code does have intellisense, so I'm unclear what you require here, are you sure it's not set to cmd.exe instead ?
On another note, follow this setup guide. In case you haven't already installed the PowerShell Extension.
I've noticed this code in the keyboard shortcut settings.
{ "key": "ctrl+shift+c", "command":"workbench.action.terminal.openNativeConsole" },
I was wondering, instead of opening cmd.exe, can I change it to open Powershell?
Starting in v1.1.0, we can now configure the external shell.
Before version 1.6.1, there was only one setting.
"externalTerminal.windowsExec": "powershell"
Starting with version 1.6.1, there is an external and internal terminal setting. Using the value "%COMSPEC%", one could instead change their COMSPEC environment variable.
// The path of the shell that the terminal uses on Windows. When using shells shipped with Windows (cmd, PowerShell or Bash on Ubuntu), prefer C:\Windows\sysnative over C:\Windows\System32 to use the 64-bit versions.
"terminal.external.windowsExec": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
// The path of the shell that the terminal uses on Windows. When using shells shipped with Windows (cmd, PowerShell or Bash on Ubuntu), prefer C:\Windows\sysnative over C:\Windows\System32 to use the 64-bit versions.
"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
I found, however, that it opens the 32bit Powershell.exe. Which, for me, did not have its execution policy set. So I set it using the following...
I elevated my permissions (Powershell's version of sudo):
Start-Process Powershell -Verb Runas
Then, in the new elevated Powershell window:
Set-ExecutionPolicy RemoteSigned
At the moment, the customization is more geared towards changing the keys / conditions that trigger the actions, rather than adding new actions.
It would be great to be able to create custom actions too - and the Visual Studio Code team are interested in hearing ideas on their User Voice site.
I have added a suggestion for custom actions.
There is still no setting yet as of February 2016, but you can use the CodeShell extension and once installed use Ctrl-Alt-P to launch a PowerShell window at the root of the project folder.