Menu
AWS Command Line Interface
User Guide

Troubleshooting AWS CLI Installations on Linux

After installing with pip, you may need to add the aws executable to your OS's PATH environment variable, or change its mode to make it executable.

Example AWS CLI install location - Linux with pip (user mode)

~/.local/bin

If you see an error message like -bash: aws: command not found when you try to use the AWS CLI, add the location of the executable to your PATH environment variable.

To modify your PATH variable (Linux, macOS, or Unix)

  1. Find your shell's profile script in your user folder. If you are not sure which shell you have, run echo $SHELL.

    $ ls -a ~
    .  ..  .bash_logout  .bash_profile  .bashrc  Desktop  Documents  Downloads
    • Bash.bash_profile, .profile, or .bash_login.

    • Zsh.zshrc

    • Tcsh.tcshrc, .cshrc or .login.

  2. Add an export command to profile script.

    export PATH=~/.local/bin:$PATH

    This command adds a path, ~/.local/bin in this example, to the current PATH variable.

  3. Load the profile into your current session.

    $ source ~/.bash_profile

If you see permission denied when you try to use the AWS CLI, make sure that the aws script has a file mode that is executable. For example, 755.

To make the aws script executable

  1. Locate the script.

    $ which aws
    ~/.local/bin
  2. Run chmod +x to make the file executable.

    $ chmod +x ~/.local/bin