How to switch to Powershell on Mac Terminal

To switch to Powershell from any shell ZSH/bash etc on the 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.

% pwsh

PowerShell 7.2.1
Copyright (c) Microsoft Corporation.
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

Facing issues? Have Questions? Post them here! I am happy to answer!

Author: Rakesh
Author Info:

Rakesh is a seasoned developer with over 10 years of experience in web and app development, and a deep knowledge of operating systems. Author of insightful How-To articles for Code2care.

Follow him on: X

Copyright © Code2care 2023 | Privacy Policy | About Us | Contact Us | Sitemap