BGL
March 1, 2018, 12:02pm
21
I think the simplest solution is to specify curl.exe if you are using Windows PowerShell. In PowerShell Core the alias has been removed - so using curl there should now work if you are on the insider build.
The other way to come at it is if you have WSL setup you can just use wsl to call a Bash command. e.g.
wsl curl --help
Iâm surprised nobody has brought up the Windows Subsystem for Linux which allows you to run a Linux command line environment on Windows 10. Microsoft worked closely with Ubuntu to bring that one to life.
1 Like
Eden
March 1, 2018, 6:02pm
23
I donât know why I didnât include it. I actually made a wiki post on WSL as well that im working to expand.
This is a quick intro to Windows Subsystem (WSL) for Linux and how to get it installed.
[image]
[This is a wiki post, feel free to add information, or new sections about WSL with the edit button at the end of this post]
Enable and Install
Search for: Turn Windows Features on and off (you can press the windows key and search for âfeaturesâ)
fig1 [image]
Or You can enable the feature from powershell
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
You will likely need to reboot at this point as well.
Next install a WSL distro. Currently there is only Ubuntu, OpenSUSE Leap 42, and SUSE Linux Enterprise Server 12. Fedora is scheduled to be included in the near future.
You can install these from the Windows Store by searching for âWSLâ
fig2 <a class="lightbox" href="https://forum.level1techs.com/uploads/default/original/3X/c/2/c26511d4fd244d2e887468f70f7c5e1d94038d66.png" data-download-href="https://forum.level1techs.com/uploads/default/c26511d4fd244d2e887468f70f7c5e1d94038d66" title="image.png">[image]</a>
You can also install a distro from the command line, though it is a little more involved. Instructions for this method can be found here https://docs.microsoft.com/en-us/windows/wsl/install-on-server
Available Distributions
Currently available distros:
Ubuntu
OpenSUSE
OpenSUSE professional
Debian
Kali Linux
Distros in the works:
Fedora
Use
You can run the system from the windows start menu (in my case, searching for ubuntu), or via running bash from the command line in cmd or powershell to invoke the default distro. wsl will do the same, or you can specity the distro you want to start, e.g. ubuntu
Youâll be asked to create a user and password when you first initialise the system. once done, welcome to your new Linux distro on Windows.
Most things works. With newer Windows releases you will have access to better integration.
I think the main limitation right now is the lack of X/Wayland support for example. Though this is initially designed for accessing a Linux core system for the power it can provide.
You can do some cool things with it like calling Linux commands from Windows
Use Cases for WSL
C Development on Windows with WSL
To setup a C dev environment on Windows with WSL:
sudo apt instalâŚ
1 Like