What’s new for the Command Line in Windows 10 version 1803
The next Windows 10 update includes many new features for Command Line developers. In this post weâll review WSL, Hyper-V, new tools, and UWP Console applications coming to the Microsoft Store.Â We want to thank everyone who tried these updates via the Insiders program and provided feedback.Â We really appreciate hearing from you both when we get something right, and when we need to do better.Â Your success and improved productivity with these tools is our ultimate goal.
Weâll start the summary of this Windows 10 update with the Windows Subsystem for Linux (WSL).Â WSL provides the ability to run Linux binaries on Windows with no VM, and WSL has been very popular.Â Now that most of the popular stacks are working well on WSL weâve been able to spend more time on improving system integration and configuration.
New Distros in the Store
Weâre excited to see more distros come to the Microsoft Store for running on WSL.Â Windows 10 supports having multiple distros for WSL installed on the same machine and running them simultaneously.
Kali Linux ships for WSL
Announcing and the latest addition to the distros on WSL â Kali Linux. Kali Linuxâs focus is on penetration testing and they explain their reasons for publishing to WSL here. Itâs now easy for developers on Windows 10 to try Kali!Â Read more in the announcement blog post.
Debian GNU/Linux ships for WSL
Weâre also excited to announce the addition of Debian GNU/Linux to the Store. Debian is a flavor of Linux that comes with over 51,000 packages, a package manager (APT), and other utilities that make it possible to manage thousands of computers as easily as installing a single application. Check out Debian now available in the Store! Read more in the announcement blog post.
A new fileÂ /etc/wsl.conf is now supported to give you more control over your distro configuration when launching your environment. Drive mounting, and network configuration are the two specific areas supported at the moment. Read the wslconf blog post for more details, and let us know what other features you want added to wsl.conf.
Youâve been able to run background tasks but a caveat was you had to remember to keep a WSL console up or the tasks would end. In this update you can run tasks in the background even after you close the WSL console windows. For more details check out the background tasks blog post.
Great interoperability with the rest of Windows is one of WSLâs top features.Â Weâre pleased to announce many interop improvements in this update.
wslpath is a new tool you can use to convert paths between Windows and Linux.Â Run wslpath in a WSL environment.
The options are:
-a force result to absolute path format -u translate from a Windows path to a WSL path (default) -w translate from a WSL path to a Windows path -m translate from a WSL path to a Windows path, with â/â instead of â\\â
We received a lot of feedback that the inability to share environment variables between Windows and WSL was a major pain point. Weâre glad we could address this issue in this Windows update. Read more about this feature in the environment variable blog post.
The filesystem support for WSL is greatly improved. Linux permissions are now added as additional metadata to files. You can create special files like fifos, unix sockets, and device files. And there are more mount options. Read more in the filesystem improvements post. Case sensitivity improvements were also enabled via the DrvFs filesystem driver as an opt-in feature. Directories where you enable a case sensitivity flag allow you to create files where names are only different in casing. This works for Windows tools too as shown in this blog post.
VS Code has rapidly grown in popularity as a text editor/IDE for all types of projects. Now you can use VS Code on Windows to debug a NodeJS project running the Linux NodeJS (on WSL).Â The setup is simple â add one attribute to your projectâs launch.json.
Unix Sockets werenât supported on Windows, and now they are! You can also communicate over Unix sockets between Windows and WSL. There are some rules regarding permissions and interop so make sure to read the unix socket blog post for details. One of the great things about this is it enables WSL to run the Linux Docker Client to interact with the Docker Daemon running on Windows. Instructions on how to set this up are covered in the docker post.
Linux VMâs running on Hyper-V can now benefit from an enhanced session mode. The key tech enabling this is the open source XRDP project which enables us to interact with the Linux VM the same way we do with Windows which is via the RDP protocol. Give this a try and youâll see the user experience improvement is significant.
If youâre someone who doesnât like to spend a lot of time configuring VMâs you need to know about Quick Create. This tool allows you to quickly create VMâs without going through a multi-step wizard.
More CLI Tools
Windows 10 now includes more Windows native CLI tools. We did this because you asked.Â Itâs common for developers to have muscle memory for these tools and weâre glad to bring them to Windows 10.
OpenSSH-based client and server
OpenSSH is a suite of tools originally created by the OpenBSD Foundation for remote command-line administration, public/private key management, secure file transfers, and more.
The SSH client and key agent are enabled and available by default in this Update, and the SSH server is an optional feature-on-demand. For more information, check out this blog post on the beta we shipped in Fall Creators Update.
Tar and Curl with Windows 10
Tar allows you to create and unpack .tar archive files.Â The tar format is common in Linux much like zip is common in Windows.
Curl is a feature rich CLI tool for sending and receiving files.Â It supports a variety of protocols.Â A simple use case is you can easily make an HTTP request and view the response all from the command line.
Read the announcement blog post for more details.
UWP Console Applications
UWP is the Universal Windows Platform which includes many improvements in application packaging, deployment, and functionality.Â With Windows 10 youâve been able to continue building classic console applications but not UWP console applications. In this Windows 10 update, UWP Console applications are now supported!
One of the reasons weâre excited about this is it means developers can now ship Console Applications in the Microsoft Store!Â Thereâs some work done for multi-instancing, debugging multi-instance apps, aliasing of console apps so you easily launch them from a CLI, and templates in Visual Studio.Â More details are covered here and the post includes a video link with demos.
Those are some highlights for Command Line developers in this Windows 10 update. We hope you agree these are great additions. Thanks again for following this blog and providing feedback. Weâre already working on the next Windows 10 release and your input makes a big difference.
Stay in Touch
In addition to commenting on posts in this blog, many of us are on Twitter
Sarah Cooley @virtualscooley John Starks @gigastarks Taylor Brown @taylorb_msft Ben Hillis @benhillis Ben Armstrong @vBenArmstrong Craig Wilhite @CraigWilhite Rich Turner @richturn_ms Yosef Durr @yosefdurr
Weâll also be at developer events over the next 6 months speaking and/or staffing the Microsoft booth. Here are some of the events weâll be at. If youâre at one of these please stop by and say hello! Qcon London, Scale 16x, DockerCon, ReactEurope, Front Trends, JSConf EU, Full Stack, OSCON