Microsoft has released its command-line shell and scripting language PowerShell Core for the Ubuntu Snap Store, as part of PowerShell Core's release as a snap package.
'Microsoft loves Linux', the company's CEO Satya Nadella declared in 2014.
Evidence of that newfound affection has been evident throughout 2018: with Ubuntu 18.04 being made available in the Microsoft Store, Windows File Explorer gaining the ability to launch a Linux Shell and a new option to install Windows Subsystem for Linux (WSL) distros from the command line. That's without mentioning Microsoft's release of the Linux-based Azure Sphere operating system.
Now Microsoft has released its command-line shell and scripting language PowerShell Core for the Ubuntu Snap Store, as part of PowerShell Core's release as a snap package.
Snap packages are containerized applications that can be installed on many Linux distributions, which Joey Aiello, PM for PowerShell at Microsoft, says has several advantages.
SEE: Windows administrator's PowerShell script kit (Tech Pro Research)
"Snap packages carry all of their own dependencies, so you don't need to worry about the specific versions of shared libraries installed on your machine," he said, adding updates to Snaps happen automatically, and are "safe to run" as they don't interact with other applications or system files without your permission.
To install PowerShell Core as a snap package on a Linux-based OS, first install snapd and then run the command snap install powershell —classic. Then run the command pwsh from the terminal.
Microsoft continues to make regular improvements to the Windows Subsystem for Linux (WSL), which allows Windows 10 to run various GNU/Linux distros from the Windows Store, providing access to Ubuntu, openSUSE, Fedora, Kali Linux, and Debian, and other distros to be added over time.
WSL distros run with a command line shell, rather than offering graphical desktops, and support a range of command line tools, as well as applications such as Apache web server and Oracle MySQL.
WSL allows different Linux distros to run side-by-side within Windows and Microsoft has previously stated that its aim with the WSL is to provide "the best development environment, regardless of the technologies that developers use, or the platforms they wish to target".
However, at present, the WSL also has many disadvantages over a running a dedicated GNU/Linux system. Microsoft doesn't support desktop environments or graphical applications running on WSL, and also says it is not suitable for running production workloads, for example an Apache server supporting a website.
This year saw Microsoft improve WSL to add support for Unix sockets allowing for communication between Windows, as well as for the curl and tar commands
The big takeaways for tech leaders:
- Microsoft has released its command-line shell and scripting language PowerShell Core for the Ubuntu Snap Store, as part of PowerShell Core's release as a snap package.
- Snap packages are containerized applications that can be installed on many Linux distributions.
- PowerShell: The smart person's guide (TechRepublic)
- 10 PowerShell commands every Windows admin should know (TechRepublic)
- 10 reasons why you should learn to use PowerShell (TechRepublic)
- Microsoft delivers PowerShell core for Windows, Linux, Mac (ZDNet)
- Microsoft open sources PowerShell; brings it to Linux and Mac OS X (ZDnet)