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 Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail:

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