I made a directory /opt. How can I add it to the path for all users?
I tried adding it to /etc/profile but it didn't work.
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
if [ "`id -u`" -eq 0 ]; then
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt"
else
PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/opt"
fi
export PATH