Add to $PATH

Add /path/to/directory to $PATH

For terminal

$ export PATH=/path/to/directory:$PATH

For system

Write a /etc/profile.d/add_to_path.sh file:

export PATH=/path/to/directory:$PATH

Then:

$ sudo chmod +x /etc/profile.d/add_to_path.sh

Reboot.

For sudo

$ sudo visudo

Add in secure_path="...", and reboot.

Check

$ echo $PATH