Skip to main content
added 26 characters in body
Source Link

The /etc/profile file, which Bash executes for login shells, includeincludes the following content:

# System-wide .profile for sh(1) if [ -x /usr/libexec/path_helper ]; then eval `/usr/libexec/path_helper -s` fi if [ "${BASH-no}" != "no" ]; then [ -r /etc/bashrc ] && . /etc/bashrc fi 

It's the path_helper program, which that sets up the PATH environment variable.

man path_helper:

The path_helper utility reads the contents of the files in the directories /etc/paths.d and /etc/manpaths.d and appends their contents to the PATH and MANPATH environment variables respectively. ...

In particular, the Go installer creates a file called go in /etc/paths.d with the following content:

cat /etc/paths.d/go /usr/local/go/bin 

The /etc/profile file, which Bash executes for login shells, include the following content:

# System-wide .profile for sh(1) if [ -x /usr/libexec/path_helper ]; then eval `/usr/libexec/path_helper -s` fi if [ "${BASH-no}" != "no" ]; then [ -r /etc/bashrc ] && . /etc/bashrc fi 

It's the path_helper program, which sets up the PATH environment variable.

man path_helper:

The path_helper utility reads the contents of the files in the directories /etc/paths.d and /etc/manpaths.d and appends their contents to the PATH and MANPATH environment variables respectively. ...

In particular, the Go installer creates a file called go in /etc/paths.d:

cat /etc/paths.d/go /usr/local/go/bin 

The /etc/profile file, which Bash executes for login shells, includes the following content:

# System-wide .profile for sh(1) if [ -x /usr/libexec/path_helper ]; then eval `/usr/libexec/path_helper -s` fi if [ "${BASH-no}" != "no" ]; then [ -r /etc/bashrc ] && . /etc/bashrc fi 

It's the path_helper program that sets up the PATH environment variable.

man path_helper:

The path_helper utility reads the contents of the files in the directories /etc/paths.d and /etc/manpaths.d and appends their contents to the PATH and MANPATH environment variables respectively. ...

In particular, the Go installer creates a file called go in /etc/paths.d with the following content:

cat /etc/paths.d/go /usr/local/go/bin 
Source Link

The /etc/profile file, which Bash executes for login shells, include the following content:

# System-wide .profile for sh(1) if [ -x /usr/libexec/path_helper ]; then eval `/usr/libexec/path_helper -s` fi if [ "${BASH-no}" != "no" ]; then [ -r /etc/bashrc ] && . /etc/bashrc fi 

It's the path_helper program, which sets up the PATH environment variable.

man path_helper:

The path_helper utility reads the contents of the files in the directories /etc/paths.d and /etc/manpaths.d and appends their contents to the PATH and MANPATH environment variables respectively. ...

In particular, the Go installer creates a file called go in /etc/paths.d:

cat /etc/paths.d/go /usr/local/go/bin