<分区>
我按照本文 (https://docs.aws.amazon.com/cli/latest/userguide/awscli-install-linux.html#awscli-install-linux-path)to 在 Raspberry Pi 上安装 AWS CLI。 (OS: PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)")
尽管我遇到了名为“将 AWS CLI 可执行文件添加到您的命令行路径”部分的问题,但这些步骤非常简单
按照说明,我确定我需要运行以下两个命令来完成此步骤:
$ export PATH=~/.local/bin:$PATH
$ source ~/.profile
执行此操作后,我可以运行 $ aws
,我会按预期看到以下消息:
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:
aws help
aws <command> help
aws <command> <subcommand> help
aws: error: too few arguments
到目前为止一切都很好。如果我关闭我的终端然后重新打开一个新终端并尝试运行以 aws
开头的命令,我会得到以下信息:
bash: aws: command not found
我发现如果我重新运行以下...
$ export PATH=~/.local/bin:$PATH
$ source ~/.profile
...然后它再次运行...直到我关闭终端窗口。
所以我的问题是:
这是预期的行为吗,每次我想使用 AWSCLI 时都必须重新运行这些命令?或者这一步应该是一次完成。我承认我不太了解这些命令的性质,或者它们试图达到的目的。