Bash

Bash is a Unix shell and command language created by Brian Fox as a free software replacement for the Bourne shell for the GNU Project.

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 Ubuntu 18.04.4

The Terminus command-line tool of Pantheon.io can easily be installed on Ubuntu 18.04.4 (Bionic Beaver).

Install the dependencies and requirements, since Terminus is written in PHP scripting language, the minimum version requirement 5.6 running it on PHP v7.3 is much faster.

The PHP extensions needed are:

  • curl
  • cli
  • mbstring
  • xml

PHP v7.3

sudo -A add-apt-repository ppa:ondrej/php -y;
sudo apt-get update

Dependencies and Requirements

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

Composer (skip if the machine in use has a prior composer installed.)

curl -sS https://getcomposer.org/installer -o composer-setup.php
php composer-setup.php --filename=composer
sudo mv composer /usr/local/bin/composer

Install Terminus via Composer

composer require pantheon-systems/terminus

Then in order that terminus can be executed on all folders, create a symlink that can be accessed.

sudo ln -s /home/vagrant/vendor/pantheon-systems/terminus/bin/terminus  /usr/local/bin/terminus

Test that it is properly installed

terminus -v

Authenticate

terminus auth:login --machine-token=‹machine-token›