PowerShell, install this command line shell on Ubuntu 22.04

about PowerShell

In the following article we are going to take a look at how we can install PowerShell on Ubuntu 22.04. This is a configuration management and task automation platform. It consists of a shell of Command line cross-platform and an associated scripting language.

As we said, this is both a command line shell and scripting language with over 130 command line utilities called cmdlets. These follow extremely consistent naming and syntax conventions, and can be extended with custom cmdlets.

PowerShell(originally called Windows PowerShell) is a console interface (CLI), with the possibility of writing and joining commands by means of instructions. This console interface is designed for use by system administrators for the purpose of automating tasks or performing them in a more controlled manner. PowerShell is an object oriented shell.

PowerShell working

Previously, Microsoft Windows PowerShell was only software available for Windows, but in 2016 the developers made it open source and cross-platform. That is why today being able to use it in Ubuntu is very simple. Even though after trying the different installation options available in Ubuntu 22.04, only the one we are going to see below has worked.

Install Microsoft PowerShell on Ubuntu 22.04 LTS

PowerShell is now officially supported by most Gnu/Linux distributions. All the latest PowerShell packages for Gnu/Linux are available at GitHub.

Without a doubt the easiest way to install PowerShell in Ubuntu is using the package manager Snap, and that today, as I was saying, is the only way I have been able to install PowerShell on Ubuntu 22.04. This universal package manager is enabled by default in the system, so we will only have to open a terminal (Ctrl+Alt+T) and write in it:

install powershell as snap

sudo snap install powershell --classic

After the installation, we can start the program looking for your launcher in our system.

app launcher

uninstall

For remove snap package that we just installed, in the terminal (Ctrl+Alt+T) you just have to use the command:

uninstall powershell snap

sudo snap remove powershell

With PowerShell users can use simple commands (to show the current time) and much more complex applications. It is also possible to use the combination of several commands ("pipeline"). For more information about this program, users can go to the project website.


Be the first to comment

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.