Problem with these instructions? Please send a CFDDFC Support Query.

Overview of the CFDDFC CLI

The CFDDFC CLI is a collection of shell (/bin/sh) scripts contained in a directory named cfddfc-cli.  The directory includes a main cfddfc script and bin and lib directories containing scripts that are executed and sourced, respectively, from the main script.  The cfddfc-cli directory can be installed anywhere on the Linux system.  With root privileges, it can be installed in system-wide location available to all users; without root privileges, it can be installed by a single user somewhere within in their home directory.  We recommend one of the following locations:

  • /usr/local – system-wide location requiring root privileges;
  • $HOME/bin  – single user location without root privileges.

Option 1: System-Wide Installation

For a system-wide installation, you need root privileges; if your user is part of the admin group, then you can gain root-level access using sudo. Go to the /usr/local directory and download and unpack the cfddfc scripts directory with the following command:

sudo sh -c "(cd /usr/local && curl http://dl.cfd.direct/cfddfc-cli.tgz | tar xvz --no-same-owner)"

Create a soft link to the main script in /usr/local/bin, which is generally on all user’s search PATH:

sudo ln -s /usr/local/cfddfc-cli/cfddfc /usr/local/bin/cfddfc

Option 2: Single User Installation

The $HOME/bin directory must first exist to install in that directory.  Create the bin directory if it does not exist with:

mkdir $HOME/bin

Go into the bin directory and download and unpack the cfddfc-cli script directory:

cd $HOME/bin
curl http://dl.cfd.direct/cfddfc-cli.tgz | tar xvz

The user should finally enable the system to find the main cfddfc script.  Two ways to do this are described below, choose one of them.

EITHER add $HOME/bin/cfddf-cli to the user’s PATH by editing their default shell configuration file, e.g. $HOME/.bashrc and adding the following line at the end of the file:

PATH=$PATH:~/bin/cfddfc-cli

OR, if $HOME/bin is already on the PATH (check with “echo $PATH”), create a soft link in that directory to the main script, i.e.:

ln -s ${HOME}/bin/cfddfc-cli/cfddfc ${HOME}/bin/cfddfc

Test the Installation

The installation can be tested by typing in the terminal:

cfddfc help

which should bring up some help text, that begins with:

Command line tool for launching CFD Direct From the Cloud (CFDDFC) on Amazon Web
Services (AWS): https://cfd.direct/cloud/aws

Next Step → Configure the CFDDFC CLI