Difference between revisions of "Installation (PowerShell Core)"

Jump to navigation Jump to search
→‎Procedure: Added "Ubuntu 18 / Correct Culture"
(Added Windows install)
(→‎Procedure: Added "Ubuntu 18 / Correct Culture")
 
Line 3: Line 3:
== Procedure ==  
== Procedure ==  
=== Linux ===
=== Linux ===
These instructions are for Ubuntu 16.04 LTS, but can be adapted for other versions as indicated, for other distributions see https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-powershell-core-on-linux?view=powershell-6 for further info.  The procedure below has been tested on both Ubuntu 14.04 and 16.04.
These instructions are for Ubuntu 16.04 LTS, but can be adapted for other versions as indicated, for other distributions see https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-powershell-core-on-linux?view=powershell-6 for further info.  The procedure below has been tested on both Ubuntu 14.04 and 16.04.  However, be aware that if need to use a locale/culture other than en_US, you may find that the below won't install PowerShell with correct culture - see [[#Ubuntu 18 / Correct Culture|Ubuntu 18 / Correct Culture]] below.


# Register Microsoft repository GPG key
# Register Microsoft repository GPG key
Line 15: Line 15:
# Launch PowerShell
# Launch PowerShell
#* <code> pwsh </code>
#* <code> pwsh </code>
=== Ubuntu 18 / Correct Culture ===
You need to have the OS locale correct before you install PowerShell, as long as this is correct you should end up with the right version.  The procedure below assumes '''en_GB''', use the correct code for you.
'''Check / correct locale'''
# Check Ubuntu is using the correct culture
#* <code> locale </code>
# If your locale is not displayed, if not check what is currently available
#* <code> locale -a </code>
# If your locale is not displayed, generate it
#* EG <code> locale-gen en_GB.UTF-8 </code>
# To set Ubuntu to use the correct locale use the following command
#* EG <code> update-locale LANG=en_GB.UTF-8 </code>
# Reboot for the change to take effect
#* <code> reboot </code>
'''Install PowerShell'''
# Install snap
#* <code>snap install powershell --classic</code>
# Go into PowerShell CLI and check culture
#* <code> powershell </code>
#* <code> Get-Culture </code>


=== Windows ===
=== Windows ===

Navigation menu