[note] Installation of Golang (PATH)

Install Go on macOS

  1. Install Go using Homebrew:

    1
    brew install go
  2. Verify the Installation:
    After installation, check if Go binaries are located in ~/go/bin/:

    1
    ls ~/go/bin/
  3. Update PATH Temporarily:
    If the Go binaries are present, temporarily add ~/go/bin to your PATH:

    1
    export PATH=$PATH:~/go/bin
  4. Update PATH Permanently:
    To make this change permanent, add the following line to your ~/.zshrc file:

    1
    2
    echo 'export PATH=$PATH:~/go/bin' >> ~/.zshrc
    source ~/.zshrc

[note] Installation of Golang (PATH)

https://hsiangjenli.github.io/blog/note_go/

Author

Hsiang-Jen Li

Posted on

2024-08-27

Updated on

2024-12-18

Licensed under