In this tutorial, you will learn to Install PowerShell on Debian 12 Bookworm by using Snap. PowerShell is a powerful command-line shell and scripting language developed by Microsoft. It is used for system administration tasks and automation. Also, you can use PowerShell in Linux distributions. Now you can proceed to the following steps to start PowerShell Installation on Debian 12 and how to work with it.
A Simple Way To Install PowerShell on Debian 12
Before you start your setup, you need to access your server as a non-root user with sudo privileges. To do this, you can check the Initial Server Setup with Debian 12.
Step 1 – Installing PowerShell with Snap on Debian 12
First, you need to run the system update and install some required packages:
# sudo apt update
# sudo apt install curl gnupg apt-transport-https -y
Then, use the following command to install the Snapd package on your Debian 12:
sudo apt install snapd -y
Reboot your server, once your installation is completed:
sudo reboot
Next, use the Snap command to search for the PowerShell package:
sudo snap find powershell
Now use the following command to install the appropriate package:
sudo snap install powershell --classic
Output
powershell 7.4.1 from Microsoft PowerShell✓ installed
Also, you can verify your PowerShell installation by using the following command:
pwsh --version
Output
PowerShell 7.4.1
Step 2 – How To Work with PowerShell on Debian 12?
At this point, you can simply access your PowerShell terminal by running the command below:
pwsh
Once you access your shell, you can use the Get-Command to see a list of Cmdlet:
For example, to display the current path, you can run:
From PowerShell, you can easily use the Cmdlets and do your tasks.
To exit from PowerShell, you can simply type exit.
Conclusion
Set up Clang LLVM on Debian 12
Install Tesseract OCR on Debian 12 via Terminal
Install PowerShell on Ubuntu 22.04