Tag: Linux

Last updated by at .

PowerShell Core

PowerShell Core 6.0 for Windows, Linux and macOS General Available (GA)

Microsoft yesterday announced the general availability of PowerShell Core 6.0. PowerShell Core 6.0 is a new edition of PowerShell that is cross-platform (Windows, macOS, and Linux), open-source, and built for heterogeneous environments and the hybrid cloud. PowerShell Core uses .NET Core 2.0 as its runtime. PowerShell Core also exposes the API set offered by .NET Core 2.0 to be used in PowerShell cmdlets and scripts.

First and foremost, thank you to all of our amazing community, especially our open-source contributors (the most recent of which you can find on our community dashboard at https://aka.ms/PSGitHubBI) for donating your time and energy to PowerShell Core. Whether you contributed code, tests, documentation, issues, or even just your feedback and opinions, we are extremely grateful for the sweat and tears that you’ve invested in PowerShell. (For those interested in contributing, hop and over to our Contribution Guide on GitHub. You don’t have to be a guru to help out!)

Quote: PowerShell Team Blog: PowerShell Core 6.0: Generally Available (GA) and Supported!

PowerShell Core Installer

You can get PowerShell Core 6.0 here:

PowerShell Core is open source and you can have a look at the code on PowerShell on GitHub



Tar and Curl on Windows 10

Today Microsoft released Windows 10 Insider Preview Build 17063 which includes a lot of great new features like Timeline, Activities, Microsoft Edge, Windows Subsystem for Linux improvements and much more. But Microsoft also included something for IT Pros and Developers. After the OpenSSH client and the OpenSSH server. Microsoft brings two new command-line tools for the Windows toolchain: curl and bsdtar. These tools are very well known tools in the open source world. Including them in Windows should make Windows even a better development platform.

 

Tar on Windows 10
Tar: A command line tool that allows a user to extract files and create archives. Outside of PowerShell or the installation of third party software, there was no way to extract a file from cmd.exe. We’re correcting this behavior 🙂 The implementation we’re shipping in Windows uses libarchive.

curl on Windows 10

Curl: Another command line tool that allows for transferring of files to and from servers (so you can, say, now download a file from the internet).

Why this, so first of all you have PowerShell which has similar functionality, but PowerShell is not always available (Think about Nano Server container images where you have not the Full .Net Framework available). Secondly Developers which come from other operating systems are already familiar with these tools and they can use, as they would on their “old” operating system.

If you want to know more, check out Craig Wihite’s (Microsoft) blog post: Tar and Curl Come to Windows!

As mentioned this is included in the Windows 10 Insider Preview Build 17063 and should ship to production customers in the next Windows 10 release, which might be Windows 10 (1803).



Docker for Windows Update Linux Containers

How to run Docker Linux Container on Windows 10 Fall Creator Update

I just blogged about how to run a Docker Linux Container natively on the new Windows Server version 1709. Docker today released a new update for Docker on Windows which also enables this scenario a little bit easier on your Windows 10 machine. It will ask you if you want to use the new feature to run Linux Containers natively on a Hyper-V Container running on Windows 10 (without the Moby VM).

As you can see the only thing right now you have to turn the feature on and off, since in this technical preview it is not yet possible to run Linux and Windows containers in parallel. But I guess soon that will be the case.

What you need is:

  • Windows 10 Fall Creators Update (Build 16299, Version 1709, RS3)
  • Docker for Windows 17.10.0-ce-win36 (13788) or higher

Enable Linux Containers on Windows

You can change the settings in the Docker Settings:

Docker for Windows Settings Enable Linux contianers on Windows

With hat setting on you can now run Linux Containers such as ubuntu on Windows directly, without having a Linux Virutal Machine running in the background to host the Linux containers.

Docker Run Ubuntu on Windows 10 Verions

Now you can also do some other fancy things like run the Azure CLI in a Linux Container on Windows 10.

Docker Azure CLI on Linux on Windows 10 Container

Simple and effective, and it will be even more powerful when you can run Linux and Windows Container in parallel on Windows Sever and on Windows 10.



Linux on Windows 10

Crazy times – You can now run Linux on Windows 10 from the Windows Store

In the past weeks some really crazy things are happening. Think you’re way back in the time of 2003, could you have ever imagined that Microsoft offers you to run Linux on Windows? Well this is exactly what is happening in the past months.

With one of the Windows 10 releases Microsoft added the Windows Subsystem for Linux, which basically allowed you to run a Ubuntu version on your Windows 10 devices. In the past few days and weeks Microsoft now announced that you can now download and install SUSE Enterprise Server, openSUSE Leap and Ubuntu (my guess there will be more to come) from the Windows Store. All you need today is the latest Windows Insider Build 16237 (it also works with a couple of older insider builds), and you will be able to install these versions. For the mainstream, this will be available in the Windows 10 Fall Creators Update arriving in the Fall of 2017. The Windows Subsystem for Linux will also be part in the next Windows Server RS3 release.

Ubuntu Windows 10 Store

If you want to know more about how it works check out Scott Hanselman blog about Ubuntu now in the Windows Store: Updates to Linux on Windows 10 and Important Tips

One great thing, Scott describes in his blog, if you want to configure the different Windows Subsystems for Linux and for example configure the default one, you can use the command line with the wslconfig utility.

WSLConfig on Windows 10

 



Windows Server Semi-annual Channel Overview

What is next for Windows Server and System Center with a faster release cadence

A couple of weeks ago at the Microsoft Build Conference, Microsoft released some new information about what is coming in the next version of Windows Server like Linux support on Hyper-V Container and much more. Today Microsoft just announced some new details about the next Windows Server releases and how they will work. The biggest change of todays announcement that Windows Server and System Center will also move to the Semi-annual Channel, just like Windows Client and Office moved to the Semi-annual Channel release cycle. The other large announcement is that Microsoft focuses Nano Server on Container and will remove support Nano on Hosts and Virtual Machines. This means you can run Nano Server only as a Windows or Hyper-V Container.

Nano Server is only supported as a Container Image

Microsoft is removing support for the Nano Server operating system running on physical hardware or inside Virtual Machines. Nano Server will be only supported as a Container Image. Windows Server Core will be the preferred installation option for your infrastructure servers like Hyper-V or Storage Spaces Direct.

This next release will focus on making Nano Server the very best container image possible. From these changes, customers will now see the Nano Server images shrink in size by more than 50 percent, further decreasing startup times and improving container density. As part of this effort to focus on containers, we will be removing the functionality for infrastructure-related roles. Instead of using Nano Server for these scenarios, we recommend deploying the Server Core installation option, which includes all the roles and features you would need.

Windows Server Servicing Channel

As mentioned Microsoft will offer Windows Server updates in the Semi-annual Channel as well as in the Long Term Servicing Channel for Nano Server Container Images as well as Windows Server Core.

There will be two primary release channels available to Windows Server customers, the Long-term Servicing Channel, and the new Semi-annual Channel.

Long-term Servicing Channel

The Long-term Servicing Channel is the release model you’re already familiar with (currently called the “Long-term Servicing Branch”) where a new major version of Windows Server is released every 2-3 years. Users are entitled to 5 years of mainstream support, 5 years of extended support, and optionally 6 more years with Premium Assurance. This channel is appropriate for systems that require a longer servicing option and functional stability. Deployments of Windows Server 2016 and earlier versions of Windows Server will not be affected by the new Semi-annual Channel releases. The Long-term Servicing Channel will continue to receive security and non-security updates, but it will not receive the new features and functionality.

Semi-annual Channel

The Semi-annual Channel releases will deliver new functionality for customers who are moving at a “cloud cadence,” such as those on rapid development cycles or hosters keeping up with the latest Hyper-V investments. Windows Server products in the Semi-annual Channel will have new releases available twice a year, in spring and fall. Each release in this channel will be supported for 18 months from the initial release.

Most of the features introduced in the Semi-annual Channel will be rolled up into the next Long-term Servicing Channel release of Windows Server. The editions, functionality, and supporting content might vary from release to release depending on customer feedback.

The Semi-annual Channel will be available to volume-licensed customers with Software Assurance, as well as via the Azure Marketplace or other cloud/hosting service providers and loyalty programs such as MSDN.

Windows Insider Program

At Microsoft Build, Microsoft also announced that Windows Server will be part of the Windows Insider Program, and you will see the first preview builds this summer.

System Center

in the first Semi-annual Channel release from System Center, the team will focus on System Center Operations Manager, Virtual Machine Manager, and Data Protection Manager. The key areas of investment will include support for Windows Server and Linux, enhanced performance, usability and reliability, and extensibility with Azure-based security and management services. Which will bring features like Nested Virtualization support, software load balancing, Storage QoS Self-Service and management support for heterogeneous environments with improved Linux monitoring using a FluentD agent as well as VMware backup. System Center Configuration Manager will continue to offer three releases a year to give you the latest updates for managing servers, PCs, and mobile devices.

Conclusion

This changes will improve the release cadence of datacenter and cloud innovation dramatically. Customers like service providers will have the chance to update their offerings much more often which allows them to add new features and functionality. But there is choice for customers who need a stable and not fast moving environment they can deploy builds from the Long-term servicing channel, which will have long term support. With that you should be able to choose the best solution for your environment and workload.



Bash on Windows 10

How to Install Linux Bash on Windows 10

With the Windows 10 Anniversary Update, which was released by Microsoft in Summer 2016, Microsoft included a Windows Subsystem for Linux in Windows 10. This allows you to enable Bash on Windows 10. In this blog post I quickly want to show how you can enable the Windows Subsystem for Linux on Windows 10. This is great if you want to use some Linux tools on your Windows 10 machine. I use it for example to use SSH to connect to Linux Virtual Machines on Azure.

First you have the following requirements:

  • Windows 10 Anniversary Update – Windows 10 Build 14393 and higher
  • 64-bit versions of Windows 10
  • Internet Connection to download the Windows Subsystem for Linux in Windows
  • Active Developer Mode in Windows 10

First enable Developer Mode There are two option you can do this

Open the Settings App, go to Update & Security, go to For developers and enable Developer mode:

Windows 10 - Developer Mode

You can also use the following PowerShell command to enable Developer Mode:

After this you can enable the Windows Subsystem for Linux as a Windows Feature in the Control Panel or PowerShell

Windows 10 - Windows Subsystem for Linux

Run the following PowerShell command to enable the Windows Subsystem for Linux:

Enable Windows Subsystem for Linux using PowerShell

After that you will need to restart your computer.

Now you can open up PowerShell or the command prompt and start using bash. (You can also start Bash directly from the Start Menu)

Bash on Windows 10

Hope this helps you to get started.

 



PowerShell SSH Session

Using SSH with PowerShell

Microsoft announced that they will support SSH using PowerShell in Windows 10. Until now Microsoft has a good solution for this, there is a third party solutions called Posh-SSH. To use SSH in PowerShell you first have to install the Posh-SSH PowerShell Module from the PowerShell Gallery. Make sure you are running Windows 10 or you have the Windows Management Framework 5 installed.

You can now find the Posh-SSH Module and install it:

PowerShell SSH Installation

You now have several PowerShell SSH cmdlets available:

PowerShell SSH cmdlets

Now you can create a new SSH Session using the following cmdlet (Password based authentication)

PowerShell SSH Session

You can now simply run commands against this session or use SCP to copy files.

PowerShell SSH Commands