CLOUD/AWS

aws cli v2 경로 이슈

헐리 2024. 5. 28. 11:26

when i installed aws-cli with default install script that aws provides, the symbolic link is created at /usr/bin/aws. when i command 'which aws', it shows /bin/aws and i got error when executing aws cli So i want to execute the aws from /usr/bin/aws as default

 

which aws
ls -l /bin/aws
ls -l /usr/bin/aws

#If /bin/aws exists and is causing a conflict, you can remove or rename it.
sudo rm /bin/aws

#If /usr/bin/aws doesn't already point to the AWS CLI installation, create a new symbolic link.
sudo ln -s /usr/local/bin/aws /usr/bin/aws

#환경변수 편집
vim ~/.bash_profile

# 다음 내용 추가
export PATH=/usr/bin:$PATH