-->
Homebrew, 'the missing package manager for OS X,' allows you to easily install hundreds of open-source tools. The full instructions are available on the Homebrew Wiki, but you should only need to run the command that's listed at the top of the Homebrew site. Install Xcode. To develop Flutter apps for iOS, you need a Mac with Xcode 9.0 or newer: Install Xcode 9.0 or newer (via web download or the Mac App Store). Configure the Xcode command-line tools to use the newly-installed version of Xcode by running the following from the command line.
PowerShell Core supports macOS 10.12 and higher.All packages are available on our GitHub releases page.After the package is installed, run
pwsh
from a terminal.Tip
If you already have the .NET Core SDK installed, it’s easy to install PowerShell as a .NET Global tool.
About Brew
Homebrew is the preferred package manager for macOS.If the
brew
command is not found, you need to install Homebrew following their instructions.Otherwise you may install PowerShell via Direct Download or from Binary Archives.Installation of latest stable release via Homebrew on macOS 10.12 or higher
See About Brew for information about Brew.
Now, you can install PowerShell:
Finally, verify that your install is working properly:
When new versions of PowerShell are released,update Homebrew's formulae and upgrade PowerShell:
Note
The commands above can be called from within a PowerShell (pwsh) host,but then the PowerShell shell must be exited and restarted to complete the upgradeand refresh the values shown in
$PSVersionTable
.Installation of latest preview release via Homebrew on macOS 10.12 or higher
See About Brew for information about Brew.
After you've installed Homebrew, you can install PowerShell.First, install the Cask-Versions package that lets you install alternative versions of cask packages:
Now, you can install PowerShell:
Finally, verify that your install is working properly:
When new versions of PowerShell are released,update Homebrew's formulae and upgrade PowerShell:
Note
The commands above can be called from within a PowerShell (pwsh) host,but then the PowerShell shell must be exited and restarted to complete the upgrade.and refresh the values shown in
$PSVersionTable
.Installation via Direct Download
Download the PKG package
powershell-6.2.0-osx-x64.pkg
from the releases page onto your macOS machine.You can double-click the file and follow the prompts,or install it from the terminal:
Install OpenSSL. OpenSSL is needed for PowerShell remoting and CIM operations.
Binary Archives
PowerShell binary
tar.gz
archives are provided for the macOS platformto enable advanced deployment scenarios.Installing binary archives on macOS
Install OpenSSL. OpenSSL is needed for PowerShell remoting and CIM operations.
Installing dependencies
Install XCode command-line tools
Install OpenSSL
OpenSSL is needed for PowerShell remoting and CIM operations. You can install via MacPorts or Brew.
Install OpenSSL via Brew
See About Brew for information about Brew.
To install OpenSSL, run
brew install openssl
.Install OpenSSL via MacPorts
- Install the XCode command line tools.
- Install MacPorts.If you need instructions, refer to theinstallation guide.
- Update MacPorts by running
sudo port selfupdate
. - Upgrade MacPorts packages by running
sudo port upgrade outdated
. - Install OpenSSL by running
sudo port install openssl
. - Link the libraries to make them available to PowerShell:
Uninstalling PowerShell Core
If you installed PowerShell with Homebrew, use the following command to uninstall:
If you installed PowerShell via direct download, PowerShell must be removed manually:
To remove the additional PowerShell paths, refer to the paths section in this documentand remove the paths using
sudo rm
.Note
This is not necessary if you installed with Homebrew.
Paths
$PSHOME
is/usr/local/microsoft/powershell/6.2.0/
- User profiles will be read from
~/.config/powershell/profile.ps1
- Default profiles will be read from
$PSHOME/profile.ps1
- User modules will be read from
~/.local/share/powershell/Modules
- Shared modules will be read from
/usr/local/share/powershell/Modules
- Default modules will be read from
$PSHOME/Modules
- PSReadline history will be recorded to
~/.local/share/powershell/PSReadLine/ConsoleHost_history.txt
The profiles respect PowerShell's per-host configuration.So the default host-specific profile exists at
Microsoft.PowerShell_profile.ps1
in the same locations.PowerShell respects the XDG Base Directory Specification on macOS.
Because macOS is a derivation of BSD, the prefix
/usr/local
is used instead of /opt
.So, $PSHOME
is /usr/local/microsoft/powershell/6.2.0/
, and the symbolic link is placed at /usr/local/bin/pwsh
.Additional Resources
Brew Install for Mac OS X 10.13 High Sierra
The Tutorial Shows You Step-by-step How-to Install Homebrew on Mac 10.13 High Sierra OS X.
And to Install Brew on Mac 10.13 is a Basic Task that Require only a Minimal practice with the Command Line.
Finally, the HomeBrew Tool is Very Useful if you Want to Easily Extend the Mac Software Library fishing on the *NIX Aquarium the Good Stuff! 😉
- Open a Command Line Terminal Window
Applications >> Utilities >> Terminal
(Press “Enter” to Execute Commands) - Change to HOME Directory
- Then to Install HomebrewIf Not XCode Installed then Install Mac Command line Tools:
- Now SetUp the PATH for Easy Using HomebrewAppend this Line:Ctrl+x to Save & Exit from nano Editor
Load the New PATH Variable: - Test Homebrew Installation
- And to Update Homebrew
- Fixing Permissions
- Searching for HomeBrew PackagesFind the List of Available and Installable Packages for HomeBrew:
- Finally, to Install Brew PackagesAll the New Package Installed by Homebrew will be Available because they are Installed Into the Same Location as the brew one!