Last active
August 6, 2020 16:38
-
-
Save MShahine/267b58b5e5a7ce4fa240a4c293d6855c to your computer and use it in GitHub Desktop.
GOLANG Easy Setup With Bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ "$EUID" -ne 0 ] | |
then echo "\n\n[!] Please run as root" | |
exit | |
fi | |
echo 'Downloading GO ....' | |
wget https://dl.google.com/go/go1.14.2.linux-amd64.tar.gz | |
echo 'Extracting GO To /usr/local ....' | |
tar -C /usr/local -xzf go1.14.2.linux-amd64.tar.gz | |
echo '[x] Adding The GO Path To /etc/profile' | |
printf '#Adding The GO PATH \nexport PATH=$PATH:/usr/local/go/bin\n' >> /etc/profile | |
echo '[x] Reload The Profile : ' | |
source /etc/profile | |
echo '[x] Try It : go -v ' | |
rm go1*.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Remember This Only For AMD64 For I386 Just Replace The 'amd64' To 'i386'.