Microsoft Powershell Is Now Available For Linux

Sohail
Sohail

Table of Contents

powershell is now available for linux

Powershell is a Windows command line tool and associated scripting language built on the .Net framework for performing administrative tasks on both local and remote Windows systems. Powershell has been a part of Windows systems for 10 years(November 14, 2006 ). On 18th August Microsoft announced on their blog that they have brought Powershell to Mac OSX and Linux.

In the blog announcement post, Microsoft called this move inspired by the fact that customers liked the use of PowerShell for different purposes but they didn’t like that it is just available for Windows and not for Linux.“This is a new Microsoft. Satya’s leadership and Azure have shifted us to a more open, customer-centric mindset.”

Microsoft’s Jeffrey Snover writes.

​There were a number of little changes that we made and two big things:

  1. We created a PowerShell Editor Service. This allows users to choose from a range of editors (VS Code and Sublime with others to follow) and get a great PowerShell authoring experience with Intellisense, debugging, etc.
  2. We will be extending the PowerShell Remoting Protocol (MS-PSRP) to use OpenSSH as a native transport. Users will have the option to use SSH or WINRM as transport.
    Alpha versions of Powershell are available for CentOS, Ubuntu and for Mac OSX.
Note: Powershell is only available for 64-bit architecture.

How To Install Powershell In Ubuntu 14.04 & Ubuntu 16.04?

Powershell is available as .deb files for Ubuntu 14.04 & 16.04. From the following, download the appropriate version of Powershell for your Ubuntu system.
Now open the downloaded .deb with gDebi or use dpkg from terminal to install Powershell. If the installation fails and asks for libunwind8 libicu52 or then you can install these two packages.
For Ubuntu 14.04 –
sudo apt-get install libunwind8 libicu52
For Ubuntu 16.04 –
sudo apt-get install libunwind8 libicu55

Path:

$PSHOME is /opt/microsoft/powershell/6.0.0-alpha.9/

  • User profiles will be read from ~/.config/powershell/profile.ps1
  • Default profiles will be read from $PSHOME/profile.ps1
  • User modules will be read from ~/.local/share/powershell/Modules
  • Shared modules will be read from /usr/local/share/powershell/Modules
  • Default modules will be read from $PSHOME/Modules
  • PSReadLine history will be recorded to ~/.local/share/powershell/PSReadLine/ConsoleHost_history.txt

​”If Microsoft ever does applications for Linux it means I’ve won.” Linus Torvalds

​”If Microsoft ever does applications for Linux it means I’ve won.”

​              – Linus Torvalds

Uncategorizednews