On Linux hosts, set the environment before you run any commands. You need to do this once for each session you open. Both root and egoadmin accounts use EGO commands to configure and start the cluster.
You need to reset the environment if the environment changes during your session, for example, if you run egoconfig mghost, which changes the location of some configuration files.