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.

WSL

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.

Configuration

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.

Background Tasks

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.

Interoperability

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

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.

Hyper-V

Enhanced Session

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.

Quick Create

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.

Adding these tools was one of the top tooling requests we heard from the community.

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.

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.

Summary

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

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