📜 ⬆️ ⬇️

Windows 10 Creators Update: What's new in Bash / WSL and Windows Console

When Windows 10 Anniversary Update (AU) was released, the Windows Subsystem for Linux (WSL) subsystem was still far from complete and suffered from many incompatibilities, especially with popular development tools like node.js, Java, etc.

However, it was important to transfer this amazing new feature into the hands of real users, so that we could learn from them - from YOU - what exactly WSL needs, what works, what doesn't work, etc.

And the community responded!
')
Thus, this new release of the Windows subsystem for Linux and the Bash console was created by you and for you!

On behalf of the WSL and Console development teams, I want to express my sincere thanks to everyone who tried Bash / WSL for the last 12+ months, and especially to those of you who documented problems in our GitHub repository , contacted me on Twitter , voted for suggestions in our UserVoice , asked questions on StackOverflow , AskUbuntu , Reddit , on our Command-Line blog, WSL Team blog and everywhere.

Significant improvements in Bash / WSL and Windows Console, which came out with Windows 10 Creators Update, were largely due to you!

What's new in WSL?


During the development of Windows 10 Creators Update (CU), the WSL development team implemented hundreds of fixes and improvements, most of which are listed in WSL release notes . We highlighted some of the most notable features of Console and WSL in our Command-Line blog . We thought that a summary list of the most important features and improvements would be useful.

So, here's what's new in Bash / WSL and the Console in Windows 10 Creators Update:

Greater compatibility


The main goal of Win10 CU was to drastically improve the depth and completeness of WSL compatibility with the Linux System Call Interface (SCI) kernel interfaces. By expanding and improving our system call implementations, we increased the number of tools, platforms, execution tools, and other things that our users need to run.

Result? In Win10 CU, most popular development tools work as expected, including:


Note : Some of you can go ahead and fearlessly launch applications and X / GUI desktops on WSL. Although we do not explicitly support WSL X / GUI applications / desktops, we do not in any way block or prevent their launch. So if you manage to launch your favorite editor, desktop, browser, etc., then great. But keep in mind that we are still concentrating all our efforts on ensuring really high-quality work of the command line so that you can run in the console all the development tools you need.

Ubuntu support 16.04


While Win10 Anniversary Update came with support for Ubuntu 14.04, in the new Win10 CU update, WSL now supports Ubuntu 16.04. All new instances of Bash installed on Win10 CU will now install Ubuntu 16.04.

If you want to know which version of Ubuntu works for you, type the following command in the Bash console on Ubuntu in the Windows Console:

$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.2 LTS Release: 16.04 Codename: xenial 

Important note : Existing Ubuntu 14.04 instances are NOT automatically updated as of 16.04. You need to manually update your instance on Ubuntu 16.04 in one of two ways :

  1. Removal and replacement (recommended)
  2. In-place upgrade

Removal and replacement


If you are currently running an Ubuntu 14.04 instance, then we recommend removing it and replacing it with a fresh new Ubuntu 16.04 instance.

WARNING: The following instructions will destroy your existing distribution and all files that you stored in the Linux file system . Therefore, be sure to copy / transfer any Linux files you want to save , for example, to the Windows folder (/ mnt / c / temp / wslbackup / ...) BEFORE deleting and replacing your instance!

To remove and reinstall your Ubuntu instance, run the following commands from the Cmd / PowerShell console:

 C:\> lxrun /uninstall /full /y ... C:\> lxrun /install 

The lxrun /install team will then download and install a fresh new copy of Ubuntu 16.04 on your machine.

In-place upgrade


If your Ubuntu instance has a particularly complex configuration, you can upgrade it in place, although the result may not be optimal.

If you want to upgrade your instance in place, use the Ubuntu instructions to update your existing instance:

 $ sudo do-release-upgrade 

Ifconfig and Network Connection List Support


One of the biggest drawbacks of Win10 AU was the lack of a list of network connections, which prevented tools like ifconfig, gulp, npm, and others from working correctly.

This has been fixed in the Win10 CU version, so you can use ifconfig to list connections and explore the configuration of available network adapters:



Network Ping and ICMP Support


Another problem that Win10 AU users often faced was the inability of network administrators to ping end network equipment. This is now fixed in Win10 CU:



Support for file change notifications (INOTIFY)


Another popular improvement was the ability for tools to register for file change notifications. This is essential functionality that is often used by developers for the web, Node.js, Ruby and Python, and many others.

For example, if you are working on the node.js website, then after editing the source code vim, Emacs, Sublime Text, VS Code, etc., you may want the server to download updated sources each time you save, so that when you update the browser instantly displayed.

Now you can do it! WSL supports inotify , with which applications can register for notifications of changes in the file system, which then become triggers for actions, such as rebuilding a project and restarting a local web server. This works for both DrvFS and the LxFs file system.

It is important that these file change notifications are now supported on the Windows file system. So if you edit the project source code, which is stored in the Windows file system, using an editor with a Windows GUI, such as VSCode, Visual Studio, SublimeText, Notepad ++, etc., and at the same time, node.js works in the environment Bash / WSL for local output of the site, then all changes will normally appear in it immediately after the change in the source file.



Compatibility Windows <-> Linux


The main goal of creating WSL was to reduce the “feel” when you run Windows tools along with command line tools and Linux environments. When we released WSL in Windows 10 AU, we put Linux and Windows next to each other, but there was still a big “gap” between them - although both systems could share some files, each of the environments was quite isolated from the other. .

Users often said that they want to be able to run Windows applications and Bash consoles, and run Linux and Windows applications. So we added this feature!

In Windows 10 Creators Update, you can run Windows applications and tools from the Bash console.



... and you can run Linux binaries / commands / scripts from Windows:



This feature is described in more detail in a separate blog post .

UNIX and Netlink socket enhancements


Some aspects of UNIX sockets and Netlink sockets were not supported in Anniversary Update.

Creators Update in WSL adds UNIX datagram sockets and Netlink sockets, options and properties, so many modern tools will receive various forms of interprocess communication under WSL.

See the WSL Release Notes for more details.

IPv6 and TCP socket enhancements


When preparing Creators Update, the WSL and Windows Core Networking teams worked together to implement WSL support for several additional options and TCP and IPv6 socket properties. This gives expanded support for IPv6 and others to a wide range of tools and technologies that rely on the various functions of network sockets.

See the WSL Release Notes for more details.

Various WSL enhancements


The WSL enhancements listed above are only a small selection of the most visible and important changes, but Creators Update includes hundreds of other WSL enhancements. Let us mention some more of them, and do not forget to study release notes for additional details.


Windows Console and command line enhancements


The Windows Console is one of the most fundamental parts of the entire operating system and has been part of Windows for several decades. About two years ago, a new Windows Console development team was formed, and it made the most significant restructuring of the Windows console in more than 30 years!

One of the main reasons for the cardinal upgrade of the console was that it should display the output of Linux command line tools and applications running under WSL. The development team has also implemented some of the much-needed upgrades and changes in the internal structure of the console, which will make it much faster and easier to roll out new features in the future.

So, what's new in the console in Win10 CU?

Many improvements to VT control sequences


Since the console was originally created without * NIX support, it could not handle various behaviors and output format codes ( ANSI and VT escape sequences ) generated by tools and * NIX command line applications.

Now the problem is resolved.

In Windows 10 Anniversary Update, the console was finalized, and it was able to handle the most common VT sequences, allowing you to correctly display most of the text with simple formatting. However, some advanced scripts were not supported.

In the new version of Windows Console, support for VT sequences was further expanded to correctly handle more complex VT sequences, so the console now supports many advanced features of the complex text-based interface vim , emacs , Midnight Commander , tmux , htop, and other programs.



24-bit color support


Another common community request was console support for more than 16 colors. Support for 256 colors and more is very important when working with modern increasingly complex and rich command-line tools, shells, etc.

In Win10 Creators Update, the console has been updated and supports full, beautiful 24-bit color!



For details, see the corresponding blog post with the announcement of 24-bit color support .

Mouse support


The number of rich text UIs is constantly growing, and users want mouse support for tools like Midnight Commander, Htop, and others, so we added mouse support in Win10 CU.


Artistic rendering of the author for illustration purposes

Symbolic links in Windows without administrator rights


Symbolic links (symlinks) are an important tool that is comprehensively used under Linux, but not so actively under Windows, because it requires administrator rights to create symbolic links. The console, in which symbolic links are created, had to be upgraded to admin rights - which users rarely do.

In the Windows 10 Creators Update version, the restriction on creating symbolic links under any rights is removed for users who have activated developer mode , so that symbolic links are created from any console.

See the announcement for more details on symbolic links, with examples.

What's next?


So, are we done? Nooo! Not even close finished!

For both WSL and Windows Console, there is a whole line of future improvements, new features and capabilities, which we really want to work on.

In addition, although Console and WSL are significantly improved in Creators Update, it is important to note that WSL here retains beta status, even though we cut some rough edges and sharp corners, and also improved some of the core functionality and features.

We continue to move forward with many planned improvements and great new features. Expect many interesting things in future releases of Windows 10. If you want to be among the first to get access and see the improvements planned for the next release of Windows 10, then participate in the Windows Insider program and set the Windows Insider Update Ring setting to fast mode.

As always, please leave your feedback . Let me know if you find problems when using WSL, in the WSL repository on GitHub , feel free to ask questions on Twitter , suggest new features via UserVoice , have great discussions on Reddit , StackOverflow , SuperUser and other sites, and leave comments on the Command-Line blogs and the WSL Team .

Forward!

Source: https://habr.com/ru/post/326432/


All Articles