Sui.

Post

Share your knowledge.

290697tz.
Jul 24, 2025
Expert Q&A

Why is my Sui CLI not recognizing commands?

*I just installed the Sui CLI to interact with the network, but when I type sui in my terminal, it says “command not found.” Did I mess up the installation, or am I missing something?

  • Sui
  • Architecture
4
6
Share
Comments
.

Answers

6
shamueely.
Jul 24 2025, 13:40

The “command not found” error usually means the Sui CLI isn’t installed correctly or isn’t in your system’s PATH. Reinstall it by following the official guide (https://docs.sui.io/guides/developer/getting-started/cli). Run cargo install --locked --git https://github.com/MystenLabs/sui.git sui to install the CLI. After installation, add it to your PATH by editing your shell configuration (e.g., ~/.bashrc or ~/.zshrc) with export PATH="$HOME/.cargo/bin:$PATH". Verify with sui --version.

3
Best Answer
Comments
.
Paul.
Paul4340
Jul 31 2025, 23:06

It sounds like your Sui CLI installation might not be properly set up, or the installation path might not be added to your system's PATH environment variable. Here's how you can troubleshoot and fix this:

1. Verify Sui CLI Installation

  • First, confirm if Sui CLI is installed correctly by checking the directory where you installed it.

  • If you installed using Homebrew or another package manager, verify if the installation was successful by running:

    brew list sui
    

    Or for direct installation from the GitHub repository, you can check the location where it was downloaded.

2. Check Your Path Configuration

The error message "command not found" usually means that the system cannot find the sui command in the directories listed in your PATH. This often happens if the directory where the sui CLI is installed is not added to the PATH environment variable.

  • If you installed Sui CLI manually, ensure that the folder containing the sui binary is added to your PATH.

  • To check if sui is installed and its location, run:

    which sui
    

    If this returns nothing, it's not on your PATH.

Solution:

  • Add Sui CLI to your PATH:

    1. Find the folder where sui is located (it’s typically in the installation folder).
    2. Add the folder to your PATH by editing your shell configuration file (e.g., ~/.bashrc, ~/.zshrc, or ~/.bash_profile depending on your shell).

    Example for adding to ~/.zshrc (for Zsh users):

    export PATH="$PATH:/path/to/sui-cli"
    

    Replace /path/to/sui-cli with the actual folder path where the sui binary resides. Then, run:

    source ~/.zshrc  # or `source ~/.bashrc` for bash
    

3. Reinstall Sui CLI

If the above steps don't resolve the issue, try reinstalling Sui CLI:

If you're using Homebrew (macOS or Linux), you can install Sui with:

brew install sui

Alternatively, follow the installation instructions from Sui’s GitHub releases to download the latest binaries for your platform.

4. Confirm Installation

After ensuring that the installation is correct and that sui is on your PATH, verify it by running:

sui --version

This should print the installed version of the Sui CLI if it is correctly installed.

5. Check Permissions

  • If you installed it manually and the file has incorrect permissions, ensure the sui binary is executable:

    chmod +x /path/to/sui
    

Conclusion

To resolve the "command not found" issue, make sure the Sui CLI binary is correctly installed and that its location is added to your PATH. If necessary, reinstall the CLI or update your PATH configuration.

Let me know if you need further assistance with any of these steps!

7
Comments
.
xDark.
Sep 7 2025, 07:23

Nah, you probably didn't mess up. It's almost always a PATH issue. When you installed it, the sui executable likely ended up in a directory like ~/.cargo/bin (if you used cargo install) that isn't automatically included in your system's PATH environment variable. You just need to add that directory to your PATH in your shell's config file (like .bashrc, .zshrc, or .profile) and then source it or restart your terminal. A common line to add is export PATH="$HOME/.cargo/bin:$PATH".

4
Comments
.
theking.
Jul 31 2025, 13:51

If your terminal says “command not found” after you type sui, it likely means your system can't find where the Sui CLI was installed. You probably installed it correctly, but it wasn’t added to your system’s PATH, which tells your computer where to look for command-line tools. To fix this, you need to either move the sui executable to a folder that's already in your PATH (like /usr/local/bin) or update your shell profile (like .bashrc, .zshrc, or .profile) to include the folder where Sui CLI was installed. After doing that, restart your terminal or run source ~/.bashrc (or the relevant profile file) to refresh your session.

Example transaction block (if needed):

export PATH="$HOME/.sui/bin:$PATH"
source ~/.bashrc  # or source ~/.zshrc

This should allow your terminal to recognize the sui command.

1
Comments
.

Do you know the answer?

Please log in and share it.