Microsoft PowerShell Core now can be easily installed in Ubuntu 18.04, Ubuntu 16.04 via Snap package.
PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language.
How to Install PowerShell in Ubuntu via Snap:
Snap packages are containerized applications that can be installed on many Linux distributions. Snap bundles its dependencies in a single package and updates itself automatically once new version is published.
To install PowerShell snap, open Ubuntu Software, search for and install PowerShell Core:
or open terminal (Ctrl+Alt+T) and install it by running command:
snap install powershell --classic
NOTE for Ubuntu 16.04 users first time installing a snap package, install snapd
before getting started:
sudo apt install snapd snapd-xdg-open