21

I have the following go program that runs with:

 ./hack/go/bin/wego

How can I create a symlink to run this program with the command weather?

JZ.
  • 329

1 Answers1

34
sudo ln -s /whole/path/to/script.extension /bin/weather

This will create a symlink into the /bin/ folder, which is included in everyone's PATH. If it requires sudo to run, I recommend placing it in /sbin instead of /bin.

Tim
  • 33,500
Andrew Meyer
  • 1,557