Merge pull request #1539 from PowerShell/raghushantha-linuxinstall
Better Linux install instructions
This commit is contained in:
commit
ded54be0ea
|
@ -2,54 +2,67 @@ Package installation instructions
|
||||||
=================================
|
=================================
|
||||||
|
|
||||||
Supports Ubuntu 14.04, CentOS 7.1, and OS X 10.11.
|
Supports Ubuntu 14.04, CentOS 7.1, and OS X 10.11.
|
||||||
|
All packages are available on our GitHub [releases][] page.
|
||||||
|
|
||||||
Once the package is installed, `powershell` will be in your path,
|
Once the package is installed, `powershell` will be in your path, ready to be launched from a terminal.
|
||||||
ready to be launched from a terminal. It will read
|
|
||||||
`~/.powershell/profile.ps1` for your user profile, and
|
|
||||||
`/opt/microsoft/powershell/Microsoft.PowerShell_profile.ps1` for
|
|
||||||
the host profile.
|
|
||||||
|
|
||||||
Similarly, it will search `~/.powershell/Modules` and
|
* User profiles will be read from `~/.config/powershell/profile.ps1`.
|
||||||
`/opt/microsoft/powershell/Modules` for user and system modules.
|
* User modules will be read from `~/.local/share/powershell/Modules`
|
||||||
|
* PSReadLine history will be recorded to `~/.local/share/powershell/PSReadLine/ConsoleHost_history.txt`
|
||||||
|
* System profiles will be read from `/opt/microsoft/powershell/profile.ps1`.
|
||||||
|
* System modules will be read from `/opt/microsoft/powershell/Modules`
|
||||||
|
|
||||||
To place PowerShell in your path, a symlink to the
|
The profiles respect PowerShell's per-host configuration, so the default host-specific profiles exists at `Microsoft.PowerShell_profile.ps1` in the same locations.
|
||||||
`/opt/microsoft/powershell/powershell` executable is placed at
|
|
||||||
`/usr/bin/powershell`.
|
On Linux and OS X, the [XDG Base Directory Specification][xdg-bds] is respected.
|
||||||
|
|
||||||
|
> Note that to place PowerShell in your path, the packages create a symlink from `/usr/bin/powershell` to the `/opt/microsoft/powershell/powershell` executable.
|
||||||
|
|
||||||
|
[releases]: https://github.com/PowerShell/PowerShell/releases/latest
|
||||||
|
[xdg-bds]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||||
|
|
||||||
Ubuntu 14.04
|
Ubuntu 14.04
|
||||||
============
|
============
|
||||||
|
|
||||||
Using a stock Ubuntu 14.04 image, download the
|
Using [Ubuntu 14.04][], download the Debian package `powershell_6.0.0-alpha.7-1_amd64.deb` from the [releases][] page onto the Ubuntu machine.
|
||||||
`powershell_0.5.0-1_amd64.deb` file, and then execute the following:
|
|
||||||
|
Then execute the following in the terminal:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo apt-get install libunwind8 libicu52
|
sudo apt-get install libunwind8 libicu52
|
||||||
sudo dpkg -i powershell_0.5.0-1_amd64.deb
|
sudo dpkg -i powershell_6.0.0-alpha.7-1_amd64.deb
|
||||||
```
|
```
|
||||||
|
|
||||||
CentOS 7.1
|
> Please note that that Ubuntu 16.04 is not yet supported, but coming soon!
|
||||||
==========
|
|
||||||
|
|
||||||
Using a stock CentOS 7.1 image, download the
|
[Ubuntu 14.04]: http://releases.ubuntu.com/14.04/
|
||||||
`powershell-0.5.0-1.x86_64.rpm` file, and then execute the following:
|
|
||||||
|
CentOS 7
|
||||||
|
========
|
||||||
|
|
||||||
|
Using [CentOS 7][], download the RPM package `powershell-6.0.0_alpha.7-1.x86_64.rpm` from the [releases][] page onto the CentOS machine.
|
||||||
|
|
||||||
|
Then execute the following in the terminal:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo yum install powershell-0.5.0-1.x86_64.rpm
|
sudo yum install powershell-6.0.0_alpha.7-1.x86_64.rpm
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> Please note that we have not tested this package on Red Hat Enterprise Linux.
|
||||||
|
|
||||||
|
[CentOS 7]: https://www.centos.org/download/
|
||||||
|
|
||||||
OS X 10.11
|
OS X 10.11
|
||||||
==========
|
==========
|
||||||
|
|
||||||
Using an OS X 10.11 machine, download the `powershell-0.5.0.pkg` file,
|
Using OS X 10.11, download the PKG package `powershell-6.0.0-alpha.7.pkg` from the [releases][] page onto the OS X machine.
|
||||||
double-click it, and follow the prompts. Or install it from the
|
|
||||||
terminal:
|
Either double-click the file and follow the prompts, or install it from the terminal:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo installer -pkg powershell-0.5.0.pkg -target /
|
sudo installer -pkg powershell-6.0.0-alpha.7.pkg -target /
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that because OS X is a derivation of BSD, instead of `/opt`, the
|
> Note that because OS X is a derivation of BSD, instead of `/opt`, the prefix used is `/usr/local`.
|
||||||
prefix used is `/usr/local`; thus, `powershell` lives at
|
> Thus, `powershell` lives at `/usr/local/microsoft/powershell`, and the symlink is placed at `/usr/local/bin/powershell`.
|
||||||
`/usr/local/microsoft/powershell`, and the symlink is placed at
|
> This affects the system modules and profiles as well.
|
||||||
`/usr/local/bin/powershell`. This affects the system modules and
|
|
||||||
profile as well.
|
|
||||||
|
|
Loading…
Reference in a new issue