-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Separate macOS from Linux install instructions. #5823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| # Package Installation Instructions | ||
|
|
||
| ## macOS 10.12+ | ||
|
|
||
| ### Installation via Homebrew (preferred) | ||
|
|
||
| [Homebrew][brew] is the missing package manager for macOS. | ||
| If the `brew` command is not found, | ||
| you need to install Homebrew following [their instructions][brew]. | ||
|
|
||
| Once you've installed Homebrew, installing PowerShell is easy. | ||
| First, install [Homebrew-Cask][cask], so you can install more packages: | ||
|
|
||
| ```sh | ||
| brew tap caskroom/cask | ||
| ``` | ||
|
|
||
| Now, you can install PowerShell: | ||
|
|
||
| ```sh | ||
| brew cask install powershell | ||
| ``` | ||
|
|
||
| When new versions of PowerShell are released, | ||
| simply update Homebrew's formulae and upgrade PowerShell: | ||
|
|
||
| ```sh | ||
| brew update | ||
| brew cask reinstall powershell | ||
| ``` | ||
|
|
||
| > Note: because of [this issue in Cask](https://github.com/caskroom/homebrew-cask/issues/29301), you currently have to do a reinstall to upgrade. | ||
|
|
||
| [brew]: http://brew.sh/ | ||
| [cask]: https://caskroom.github.io/ | ||
|
|
||
| ### Installation via Direct Download | ||
|
|
||
| Using macOS 10.12+, download the PKG package | ||
| `powershell-6.0.0-rc.2-osx.10.12-x64.pkg` | ||
| from the [releases][] page onto the macOS machine. | ||
|
|
||
| Either double-click the file and follow the prompts, | ||
| or install it from the terminal: | ||
|
|
||
| ```sh | ||
| sudo installer -pkg powershell-6.0.0-rc.2-osx.10.12-x64.pkg -target / | ||
| ``` | ||
|
|
||
| ### Installation via Binary Archive | ||
|
|
||
| ```sh | ||
| # Download the powershell '.tar.gz' archive | ||
| curl -L -o /tmp/powershell.tar.gz https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-rc.2/powershell-6.0.0-rc.2-osx-x64.tar.gz | ||
|
|
||
| # Create the target folder where powershell will be placed | ||
| sudo mkdir -p /usr/local/microsoft/powershell/6.0.0-rc.2 | ||
|
|
||
| # Expand powershell to the target folder | ||
| sudo tar zxf /tmp/powershell.tar.gz -C /usr/local/microsoft/powershell/6.0.0-rc.2 | ||
|
|
||
| # Set execute permissions | ||
| sudo chmod +x /usr/local/microsoft/powershell/6.0.0-rc.2/pwsh | ||
|
|
||
| # Create the symbolic link that points to pwsh | ||
| sudo ln -s /usr/local/microsoft/powershell/6.0.0-rc.2/pwsh /usr/local/bin/pwsh | ||
| ``` | ||
|
|
||
| ### Uninstallation | ||
|
|
||
| If you installed PowerShell with Homebrew, uninstallation is easy: | ||
|
|
||
| ```sh | ||
| brew cask uninstall powershell | ||
| ``` | ||
|
|
||
| If you installed PowerShell via direct download, | ||
| PowerShell must be removed manually: | ||
|
|
||
| ```sh | ||
| sudo rm -rf /usr/local/microsoft /Applications/PowerShell.app | ||
| sudo rm -f /usr/local/bin/pwsh /usr/local/share/man/man1/pwsh.1.gz | ||
| sudo pkgutil --forget com.microsoft.powershell | ||
| ``` | ||
|
|
||
| If you installed PowerShell via binary archive, PowerShell must be removed manually. | ||
|
|
||
| ```sh | ||
| sudo rm -rf /usr/local/microsoft | ||
| sudo rm -f /usr/local/bin/pwsh | ||
| ``` | ||
|
|
||
| To uninstall the additional PowerShell paths (such as the user profile path) | ||
| please see the [paths](linux.md#path) section below in this document | ||
| and remove the desired the paths with `sudo rm`. | ||
| (Note: this is not necessary if you installed with Homebrew.) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to add a step on how to check if there is a newer version of PowerShell with
brew cask outdated