How to switch to Powershell on Mac Terminal


To switch to Powershell from any shell zsh/bash etc on Mac Terminal app you can make use of the command pwsh. Just type pwsh on any shell that you are logged into and you will be switched to Powershell.

Demo:
% pwsh

PowerShell 7.2.1
Copyright (c) Microsoft Corporation.

https://aka.ms/powershell
Type 'help' to get help.

PS /Users/code2care> 

As you can see, from the default zsh shell I moved to the Microsoft Powershell using pwsh command. Once you switch you would see that the prompt has changed to PS

✌️ Note: You should have Powershell installed on your macOS, this won't work if you haven't installed the package using brew: How to install powershell on macOS

To exit Powershell just type exit.

Switch to Powershell on Mac Terminal
Switch to Powershell on Mac Terminal

Top Hashtags:

Advertisements

Advertisements




Advertisements