Newer Version Available

This content describes an older version of this product. View Latest

Install the CLI on the Windows 10 Subsystem for Linux

The Windows Subsystem for Linux (WSL) allows you to run native Linux command-line tools on Windows 10 alongside your traditional Windows desktop.
  1. From the Run dialog box (Windows key + R), run optionalfeatures.exe.
  2. In Windows Features, select Windows Subsystem for Linux.
    Windows Subsystem for Linux
  3. From the command prompt, enter bash, which triggers the installation of Ubuntu. At the prompt, enter y to agree to install the components.
    1> bash
  4. When the Ubuntu install is finished, create the directory /mnt/c/ProgramFilesLinux.
    1$ mkdir /mnt/c/ProgramFilesLinux
  5. Change to the new directory.
    1$ cd /mnt/c/ProgramFilesLinux
  6. Run wget with the download URL of the latest Linux (amd64) tarball. Find the appropriate URL in this manifest file.
    1$ wget https://developer.salesforce.com/media/salesforce-cli/sfdx-v5.7.6-d42cf65-linux-amd64.tar.xz
  7. Unpack the contents.
    1$ tar xvf sfdx-v5.7.6-d42cf65-linux-amd64.tar.xz
  8. Change to the sfdx directory.
    1$ cd sfdx
  9. Run the install script.
    1$ ./install
  10. Install Git.
    1$ sudo apt-get install git

    You must install Git for the Salesforce CLI to work correctly.

    Note