Installing Terminus on Windows using WSL 2

What is WSL? It stands for Windows Sub System for Linux. A Linux-compatible sub-system without having a need for a virtual machine. Though not entirely compatible that would run all the Linux commands and features it is good enough to install Terminus, the command-line tool from Pantheon.io.

A note of warning, since this instruction would require installing WSL, there is an article from TrendMicro a security flawed attack better read this first to be aware https://www.trendmicro.com/vinfo/us/security/news/cybercrime-and-digital-threats/bashware-attack-targets-windows-system-for-linux-wsl .

If you want a secure way, head over to one of the blog posts, Installing Terminus on Windows using a Virtual Machine.

First thing first, install WSL. Open up Powershell as an administrator.

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Restart Windows.

After restarting go to Microsoft Store and search for “Linux”, select “Run Linux on Windows”. Pick Ubuntu and get it.

It would take a while for the installation process, you would be asked to provide a new username and password.

If you got to the Ubuntu shell, install the PHP repository

   sudo add-apt-repository ppa:ondrej/php 

Make sure we are getting all the recently updated software to be installed.

sudo apt-get update

Here are all the necessary libraries that we need.

sudo apt-get install curl php7.4 php7.4-curl php7.4-cli php7.4-mbstring php7.4-xml git unzip 

Install terminus

cd ~

mkdir terminus3

cd terminus3

curl -L https://github.com/pantheon-systems/terminus/releases/download/`curl --silent "https://api.github.com/repos/pantheon-systems/terminus/releases/latest" | perl -nle'print $& while m#"tag_name": "\K[^"]*#g'`/terminus.phar --output terminus

chmod +x terminus

sudo ln -s ~/terminus3/terminus /usr/local/bin/terminus

That’s it enjoy Terminus on Windows.

Share