You want to make sure all Bash users, when they login, get access to a new program in /opt/bin

You want to make sure all Bash users, when they login, get access to a new program in /opt/bin (not currently in their PATH). To ensure this you would put the command
PATH=$PATH:/opt/bin; export PATH
in what file?

You want to make sure all Bash users, when they login, get access to a new program in /opt/bin (not currently in their PATH). To ensure this you would put the command
PATH=$PATH:/opt/bin; export PATH
in what file?

Answer: /etc/profile

Explanation/Reference:
From the man pages:
When bash is invoked as an interactive login shell it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable.



Leave a Reply 0

Your email address will not be published. Required fields are marked *