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.

% 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
Switch to Powershell on Mac Terminal
Try Out Code2care Dev Tools:


Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and software developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include learnings, tutorials, trouble-shooting steps, video tutorials, code snippets, how-to, blogs, articles, etc.

πŸŽ‰ We are celebrating the 10th years of Code2care! Thank you for all your support!

We strongly support Gender Equality & Diversity.