Powershell on Chrome OSSource: Windows Central

PowerShell is an immensely popular and powerful tool that comes built into Windows 10 with applications across enterprise, development, automation, and so much more. But PowerShell is also cross-platform and open-source, with versions available for Mac OS and Linux, too.

But what about if you're using a Chromebook, either personally or professionally? Well, so long as it's a recent machine with support for Linux apps, you can install and use Microsoft PowerShell.

Here's what you need to know.

Making sure Linux is enabled on your Chromebook

What makes the magic happen is the Crostini Linux container on Chrome OS, which will allow you to install the Linux version of Visual Studio Code on your Chromebook.

If you don't already have that enabled, it's really straightforward.

  1. Open Settings.
  2. Locate Linux (Beta) in the sidebar.
  3. Click Turn on.

    Linux on Chrome OSSource: Windows Central

  4. At the next window, click Next.

    Linux on Chrome OSSource: Windows Central

  5. Give your Linux install a username.
  6. Decide how much space you want to dedicate from your internal storage to it.

    Linux on Chrome OSSource: Windows Central

  7. Click Install.

    Linux on Chrome OSSource: Windows Central

The Linux container will now begin to download and install itself on your Chromebook. You'll know it's finished when a terminal window pops up, and then you can move on to the next step.

Save big on these VPN services ahead of Black Friday

Downloading and installing PowerShell on a Chromebook

PowershellSource: Windows Central

While PowerShell on Linux isn't exactly the same as on Windows — modules and commands specific to Windows are naturally unavailable — it's available for folks who need it. Once Linux is set up on your Chromebook, we can go about installing PowerShell.

We'll be installing PowerShell 7 here, and the process is really straightforward.

  1. Go to the PowerShell release page.
  2. Download the .deb installer for Debian 10.
  3. Locate the downloaded file, by default, it will be in your downloads folder.
  4. Right-click and select Install with Linux (beta).
  5. Click install.

A fairly short installation process will now occur, and you'll receive a notification when it's all done.

The big difference between PowerShell and other most other Linux apps installed on a Chromebook is that there won't be an app icon appear in the Linux Apps folder in your app drawer.

How to launch PowerShell inside the terminal

PowershellSource: Windows Central

PowerShell is an entirely terminal-based application, and on a Chromebook, it operates inside the Linux terminal.

Open the Linux terminal either by searching for it or just heading to your Linux apps folder and when the virtual machine has done its startup, enter this simple command.

pwsh

You'll now see a short bit of blurb beginning with the PowerShell version, and your command line will change from yourusername@penguin to PS /home/yourusername.

You're now all set to use PowerShell on your Chromebook. Any time you want to use it, simply enter the command to launch it and exit out when you're done by typing exit.

But if you're going to use it a lot, you might want to set it as the default shell for your Chromebook's Linux terminal.

Setting PowerShell as the default terminal shell

PowershellSource: Windows Central

PowerShell's bonus is that it doesn't overwrite your existing shell; any Linux commands you could normally enter in the bash shell can also be entered in PowerShell. As such, if you're going to use PowerShell a lot, you can set it as your default shell and not worry about losing any functionality.

To do this, simply fire up the terminal and enter this code.

sudo chsh -s /usr/bin/pwsh $USER

Reboot the terminal, and you'll now be taken straight into PowerShell and no longer see the regular yourusername@penguin.

And that's all you need to do to get up and running with Microsoft PowerShell on your Chromebook. Whether you're just looking to poke around and learn some of the basics or you need to use it for work or development purposes, the Linux version of PowerShell works great on a Chromebook.

We may earn a commission for purchases using our links. Learn more.