Windows

Microsoft Windows, or simply Windows, is a series of proprietary graphical operating system families that are both developed and sold by Microsoft.

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.

Installing Terminus on Windows using VM (Virtual Machine)

Terminus on Windows 10

Terminus is a command-line interface that provides advanced interaction with Pantheon. Terminus enables you to do almost everything in a terminal that you can do in the Pantheon Dashboard, and much more.

Terminus is not yet supported on any version of Windows. Some Windows users have installed Terminus usingĀ Git BASH on Git for Windows, or theĀ Windows Subsystem for Linux, but according to Pantheon documentation, it is not supported.

This solution is to use Linux on a virtual machine, also there’s an inclusion of a provisioned dependency of Terminus along with the three common plugins, namely:

  • The Build Tools Terminus Plugin
  • The Composer Terminus Plugin
  • The Site Clone Terminus Plugin

Requirements

  • PC / Laptop
    • At least 500MB of disk space
    • At least 8GB of RAM
    • CPU that supports Hyper-V or AMD Virtualization
  • Git
  • Virtual Box
  • Vagrant

Here’s the url repository

https://github.com/careydayrit/terminus-windows

Installation

  • clone repo
  • go to the repository folder after cloning
  • type vagrant up
  • type vagrant ssh
  • authenticate to pantheon using machine token

That’s it, simple steps there is no need to figure out how to install the dependency of PHP, Composer, CURL, or library dependency.

Happy Coding!