I know this is going to be something simple but I have installed golang on my linux operating system and i followed all the instructions or so I thought and golang and the associated commands with it are working great so no complaints there. The problem im having is that when I put the terminal to the root profile via the su command ONLY GO COMMANDS WORK. None of the bash commands are recognized nor any other command for that matter ive looked through all my .bashrc files where i added the go environment path/variables and its not showing up in any of the files or anywhere that Ive been able to find. If anyone has the time to lend a hand on this one Id appreciate it. Just to add when the terminal is not on the root profile everything works fine just have to use sudo which is no big deal or anything if this is nothing to worry about Im cool with that as an answer as well.
You shall prefer
Aside of that, how have you installed
go? Which linux distribution are you using? Do you have the same problem when using
sudo? Whats the value of roots
PATH? What shell does
Norbert is exactly on the right track with his questions. Including that
sudo is generally preferred over
su unless you have been using Unix systems nearly your whole life.
Your problem is most likely the result of root’s
PATH being set differently than when you are “yourself” (not su’d).
I suggest you su and then run
echo $PATH to see what is going on there. Then look in
/root/.bashrc to see how PATH is set.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.