Newer Version Available
Install the Salesforce CLI
Install the CLI on macOS
- Download the .pkg file.
- Double-click the .pkg file.
Install the CLI on Windows
Install the CLI on Linux
Find the download URL for your tarball from this manifest file. The downloads section lists unversioned URLs for the latest installers, which are especially useful for CI use cases. Select the URL based on your target platform.
-
Download or wget one of these tarballs.
1wget https://developer.salesforce.com/media/salesforce-cli/sfdx-linux-amd64.tar.xz -
Create an sfdx directory.
1mkdir sfdx -
Unpack the contents for your tarball version:
1tar xJf sfdx-linux-amd64.tar.xz -C sfdx --strip-components 1-C unpacks the contents in the sfdx directory, while --strip-components 1 removes the root path component.
-
Run the install script.
1./sfdx/installThe Salesforce CLI is installed in /usr/local/bin/sfdx. The installers are designed to provide appropriate permissions to the installation directories. If you receive permission or access errors that you can’t address by using sudo or chmod, try installing the CLI using npm.
Install the CLI with npm
This installation method is a good option if you don’t have administrator permissions on your workstation, or if group policy blocks CLI installation and updates. Installing the CLI with npm doesn’t require root permissions.
-
Ensure that the long-term support (Active LTS) version of Node.js is installed on your
computer. To install the LTS version, go to https://nodejs.org/en/download/. To check
your version number, run:
1node --version -
Run this command.
1npm install sfdx-cli --globalIf you receive a permission error when installing the CLI using npm, we recommend not using sudo. See Fixing npm permissions.
Verify Your Installation
1sfdx --version
2sfdx-cli/6.0.10-3713d7b alpha (darwin-x64) node-v8.6.0Run this command to verify the Salesforce CLI plug-in version:
1sfdx plugins --core
2salesforcedx 41.2.0 (core)This command returns a list of the other plug-ins installed in the CLI:
1sfdx pluginsThe core salesforcedx plug-in is not included in the preceding list unless you installed a newer version with the sfdx plugins:install command.
Run this command to return a list of the command families (topics) in the force namespace:
1sfdx force --helpRun this command to view all available Salesforce CLI commands:
1sfdx commandsInstall a Specific Version of the salesforcedx Plug-In
To determine which Salesforce CLI (sfdx-cli) and salesforcedx versions you have installed, run:
1sfdx plugins --core1sfdx plugins:install salesforcedx@45.8.0Install Salesforce CLI v6
To install salesforcedx plug-in v45.5.0 or earlier, install Salesforce CLI (sfdx-cli) v6.
1npm install sfdx-cli@6 --globalUsing the installer:
- Darwin (macOS)
- https://developer.salesforce.com/media/salesforce-cli/sfdx-cli/channels/stable/sfdx-cli-v6.56.0-e3fd846a1f-darwin-x64.tar.xz
- Linux 64 bit
- https://developer.salesforce.com/media/salesforce-cli/sfdx-cli/channels/stable/sfdx-cli-v6.56.0-e3fd846a1f-linux-x64.tar.xz
- Linux 32 bit
- https://developer.salesforce.com/media/salesforce-cli/sfdx-cli/channels/stable/sfdx-cli-v6.56.0-e3fd846a1f-linux-x86.tar.xz
- Linux ARM
- https://developer.salesforce.com/media/salesforce-cli/sfdx-cli/channels/stable/sfdx-cli-v6.56.0-e3fd846a1f-linux-arm.tar.xz
- Windows 64 bit
- https://developer.salesforce.com/media/salesforce-cli/sfdx-cli/channels/stable/sfdx-cli-v6.56.0-e3fd846a1f-x64.exe
- Windows 32 bit
- https://developer.salesforce.com/media/salesforce-cli/sfdx-cli/channels/stable/sfdx-cli-v6.56.0-e3fd846a1f-x86.exe