Linux - panama69/Octane_Install_Tips GitHub Wiki
This section revolves around Linux commands or configurations that were leveraged for some installations.
How to set environment variable for the octane user?
In one case, the Linux admin created a user "octane" for me but wasn't able to change the global JAVA_HOME variable for Octane to get the correct version of java on the system. In this case, we needed to set the required environment variable so the octane user would get the correct java path settings.
First, I checked what shell was set up for the octane user (see "How to find what shell is used by octane?" to learn how)
Second, I checked to see if the .bash_profile file existed in the octane home directory using the following commands:
cd ~
ls -al .bash_profile
In my case this file did not exist so I created with vi
vi .bash_profile
and added the following (make sure you put your correct java path as it may be different than what is listed below)
export JAVA_HOME=/usr/lib/jvm/java-1.8.0
export PATH=$JAVA_HOME/bin:$PATH
The environment variables will be set the next time you login in or switch user to octane (or what ever the user name is you created this for)
source .bash_profile
Yes, you could add environment variables to the .bashrc file but from what I have seen it looks cleaner and easier to do it in the .bash_profile file.
If you want to apply them to your current session then do the following:
source
How to find what shell is used by octane?
There are several ways of finding this out. From what I have seen all are some form of checking what is in the /etc/passwd file. This file contains information on all users that have accounts on the system which includes: username, password, User ID, Group ID, User ID Info, Home Directory and command/shell.
Ways to find the shell of the octane user. You can replace 'octane' with any username you wish to check for:
grep octane /etc/passwd
Or
getent passwd octane
How can I find out who or what user I am on Linux?
The simplest way is to use
whoami
But for those who want to be fancy, you can use
id -un
id returns all the user, group, and groups information for the current logged in user
-un tells id to show just the user name.