Google Chromebook

How to install PowerShell on Google Chromebook Linux mode

Here is quick code for installation of PowerShell on Google ChromeBook Pixel when Linux support is turned on:

1
2
3
4
5
6
sudo apt install curl gnupg apt-transport-https liblttng-ust-ctl2 liblttng-ust0 libunwind8 liburcu4 wget
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch main" > /etc/apt/sources.list.d/microsoft.list'
sudo apt-get update
sudo apt-get install -y powershell
sudo apt-get install -f

This will install PowerShell on your Google Chromebook Pixel in Linux mode. Once the installation is completed, you will have a working version of PowerShell on your Chromebook device. Unlike other applications, there will not be a Chrome Launcher icon for PowerShell, you instead need to launch it via a command line via a Terminal by typing “pwsh”.

Some basic PowerShell commands on Linux:

get-date     [# Display current date]
get-uptime        [# Display server uptime]
get-location      [# Display present working directory]
get-process       [# Display running process]
get-command       [# Display available PowerShell commands]
get-help "command" [#Show how to use the command]
get-alias         [# Display available aliases]
history           [#Show history of used commands]

There is more you can do with PowerShell on Linux — good book about use of PowerShell on Linux is PowerShell 6.0 Linux Administration Cookbook.

Leave a Reply