Install CMD on Linux

To install the Pnyx CMD on any variant of Linux, follow these steps.

1) Install Dotnet Runtime

If dotnet isn't already installed, use the install instructions from Microsoft for your specific system.

Please Note: you can install just the "dotnet-runtime" as opposed to the full aspnet.core run time. For example, on Ubuntu, the following simplified steps would look like:

wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install dotnet-runtime-2.2

2) Install Pnyx

Follow these steps to install Pnyx for all users.

cd /opt
sudo wget https://s3.us-east-2.amazonaws.com/bto-web-content/pnyx/cmd/pnyx.cmd-0.9.7.0.zip -O pnyx.cmd.zip
sudo unzip pnyx.cmd.zip -d pnyx
sudo chmod +x pnyx/*.bsh
sudo rm pnyx.cmd.zip

3) Create symbolic links

cd /usr/local/bin/
sudo ln -s /opt/pnyx/pnyx.bsh pnyx
sudo ln -s /opt/pnyx/pncs.bsh pncs

3) Verify Install

pnyx -i '[readString: hello world]'
pncs -i 'readString("hello world")'