- How To Install PowerShell on Linux Mint 21
- Install PowerShell on Linux Mint 21 Vanessa
- How to Install PowerShell on Linux Mint 21
- Install Powershell on Linux Mint 21
- i: Install Powershell on Linux Mint via apt
- ii: Install PowerShell on Linux Mint 21 via Snap
- Uninstall Powershell from Linux Mint 21
- i: Delete PowerShell from Linux Mint using apt
- ii: Delete PowerShell from Linux Mint using Snap
- Conclusion
- About the author
- Syeda Wardah Batool
- Как установить PowerShell в Linux Mint
- Как установить PowerShell в Linux Mint 20.1 (Cinnamon, MATE, Xfce)
- Как установить PowerShell в LMDE
How To Install PowerShell on Linux Mint 21
In this tutorial, we will show you how to install PowerShell on Linux Mint 21. For those of you who didn’t know, PowerShell is a cross-platform task automation solution made up of a command-line shell, a scripting language, and a configuration management framework. PowerShell is available on Windows, macOS, and Linux.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘ sudo ‘ to the commands to get root privileges. I will show you the step-by-step installation of a PowerShell on Linux Mint 21 (Vanessa).
Prerequisites
- A server running one of the following operating systems: Linux Mint 21 (Vanessa).
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
- A non-root sudo user or access to the root user . We recommend acting as a non-root sudo user , however, as you can harm your system if you’re not careful when acting as the root.
Install PowerShell on Linux Mint 21 Vanessa
Step 1. Before running the tutorial below, it’s important to make sure your system is up to date by running the following apt commands in the terminal:
sudo apt update sudo apt install software-properties-common apt-transport-https wget ca-certificates gnupg2
Step 2. Installing PowerShell on Linux Mint 21.
By default, PowerShell is not available on the Linux Mint 21 base repository. Now we add the PowerShell repository to your system using the following command:
echo deb [arch=amd64,armhf,arm64 signed-by=/usr/share/keyrings/powershell.gpg] https://packages.microsoft.com/ubuntu/22.04/prod/ jammy main | sudo tee /etc/apt/sources.list.d/powershell.list
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /usr/share/keyrings/powershell.gpg > /dev/null
Now start by updating the packages list and install PowerShell stable by using the command below:
sudo apt update sudo apt install powershell
Step 3. Accessing PowerShell on Linux Mint 21.
Once we finish with the installation, you can launch through the terminal with the help of the command shown below:
Congratulations! You have successfully installed PowerShell. Thanks for using this tutorial for installing the latest version of PowerShell on the Linux Mint system. For additional help or useful information, we recommend you check the official PowerShell website.
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!
How to Install PowerShell on Linux Mint 21
Most of the users don’t like to perform repetitive tasks and, select and click way to manage operations. When working with multiple operations, it is always recommended to select a program that has the ability to automate many tasks.
According to the user’s perspective, Microsoft has offered a program we know as PowerShell that is built on Microsoft .Net Framework. Powershell is a scripting language that automates administrative tasks through an interactive session with command-line shell.
It is a cross-platform program consisting of a modern command shell. It handles administrative tasks and configuration management through cmdlets which are pronounced as command-lets. Powershell is also a scripting language that can create classes, scripts, test and deploy solutions.
Install Powershell on Linux Mint 21
Powershell is an open-source program supported by different operating systems including Linux. The guide will show you how you can install it on the Linux Mint 21 system with the help of two different approaches.
Let’s perform both approaches and find out which is the easier one.
i: Install Powershell on Linux Mint via apt
To install PowerShell using apt repository, we need to install Microsoft keys and repository first. The few mentioned-below commands are need to be followed carefully:
Step 1: Upgrade the Linux Mint 21 system using the given command to update all system packages:
Step 2: Next step is to install the required dependencies that helps to run PowerShell on Linux Mint:
$ sudo apt install dirmngr ca-certificates software-properties-common gnupg gnupg2 apt-transport-https curl -y
Step 3: Now, add the Microsoft GPG key:
$ curl -fsSL https: // packages.microsoft.com / keys / microsoft.asc | gpg —dearmor | sudo tee / usr / share / keyrings / powershell.gpg > / dev / null
Step 4: Import the repository to the Linux Mint system:
echo deb [ arch =amd64,armhf,arm64 signed-by= / usr / share / keyrings / powershell.gpg ] https: // packages.microsoft.com / ubuntu / 22.04 / prod / jammy main | sudo tee / etc / apt / sources.list.d / powershell.list
Step 5: Refresh the system’s packages:
Step 6: Now, we can install PowerShell on the Linux Mint 21 after successfully installing repositories and keys. Run the mentioned command to let installation begin:
Step 7: Run the PowerShell on Linux Mint system by typing pwsh on terminal:
ii: Install PowerShell on Linux Mint 21 via Snap
Snap packages are another way to install PowerShell on the Linux Mint 21 system. For this, we need to ensure if snap package manager exists in our system by running the command:
If it is not enabled then read the guide to enable snap on Linux Mint.
Now, with the help of the following snap command you can install PowerShell on system:
You can launch it on system by running pwsh on terminal:
Uninstall Powershell from Linux Mint 21
We can also uninstall or delete PowerShell from Linux Mint 21 system using following methods:
i: Delete PowerShell from Linux Mint using apt
To delete PowerShell from Linux Mint 21 system, executing the command given-below:
Also, we need to remove the added repositories and GPG keys from the system. You can do this by copying the mentioned command in terminal:
ii: Delete PowerShell from Linux Mint using Snap
To remove PowerShell through snap packages, execute the following command:
Conclusion
PowerShell is the popular program from Microsoft for task automation. It performs operations using a command shell and reduces the problem of repetitive tasks. PowerShell is the advanced update of CMD that comes with more enhancing features in it. This article has covered two ways to install PowerShell in Linux Mint 21 system i-e through apt repository and through snap packages.
About the author
Syeda Wardah Batool
I am a Software Engineer Graduate and Self Motivated Linux writer. I also love to read latest Linux books. Moreover, in my free time, i love to read books on Personal development.
Как установить PowerShell в Linux Mint
В инструкциях по установке PowerShell довольно часто забывают про Linux Mint, видимо, их авторы считают, что пользователям Linux Mint не нужен PowerShell. Восполним этот пробел и рассмотрим, как установить PowerShell в Linux Mint.
Linux Mint имеет несколько версий — «обычная», которая, кстати, также различается окружениями рабочего стола (Cinnamon, MATE, Xfce) и LMDE (означает Linux Mint Debian Edition).
Как установить PowerShell в Linux Mint 20.1 (Cinnamon, MATE, Xfce)
Установка PowerShell в Linux Mint проходит одинаково независимо от окружения рабочего стола (Cinnamon, MATE, Xfce).
Установите необходимые пакеты:
sudo apt install -y wget apt-transport-https software-properties-common
Загрузите GPG ключи репозитория Microsoft:
wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb
Зарегистрируйте GPG ключи репозитория Microsoft:
sudo dpkg -i packages-microsoft-prod.deb
Обновите список пакетов после добавления packages.microsoft.com:
Включите репозитории «universe»:
sudo add-apt-repository universe
sudo apt install -y powershell
Обновление PowerShell будет проходить автоматически при обновлении всех пакетов в системе. Вы можете отдельно запустить обновление PowerShell командами:
sudo apt update sudo apt install powershell
Если вы хотите удалить PowerShell из Linux Mint, то выполните команду:
sudo apt remove powershell
Как установить PowerShell в LMDE
Загрузите GPG ключи репозитория Microsoft:
wget https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb
Добавьте GPG ключи репозитория Microsoft:
sudo dpkg -i packages-microsoft-prod.deb
sudo apt install -y powershell
Обновление PowerShell будет проходить автоматически при обновлении всех пакетов в системе. Вы можете отдельно запустить обновление PowerShell командами:
sudo apt update sudo apt install powershell
Если вы захотите удалить PowerShell из LMDE, то выполните команду:
sudo apt remove powershell