How to Install PowerShell on Ubuntu and Getting Started
In addition to a tip on how to proceed with any other Linux distribution.
PowerShell is a task-based command-line shell and scripting language developed in .NET. Initially just a Windows component.
You can install it on any distribution Linux . In this article we’ll look at how to do this on Ubuntu 21.04 or higher. And the first steps, plus tips for other distros.
Installation
Run the commands below in that sequence:
Use
Using PowerShell directly from the terminal:
Will appear:
To exit press:
Creating a basic script
Let’s run a Hello, World!.
Create the file and insert the content into it:
nvim hello-world.pwsh
Rotate:
Or simply:
nvim hello-world.pwsh
Give execution permission and run:
For other distros see the here procedure.
Comments