All my Hadoop configuration files are located in the following:./.linuxbrew/Cellar/hadoop/2.7.3/libexec/etc/hadoop/To set my HADOOP_HOME variable, do I use the dot notation or ~?HADOOP_HOME = ./.linuxbrew/Cellar/hadoop/2.7.3/libexec/etc/hadoop/orHADOOP_HOME =  ~/.linuxbrew/Cellar/hadoop/2.7.3/libexec/etc/hadoop/
Setting my variable, do I use the dot notation or ~?
environment variables;variable
First off, shell assignments do not allow a space before or after the variable name. Both your suggestions are syntax errors in a shell script.The relative one isn't a good idearelative paths are relative to the current working directory, not your home directory. So if you've cd'd into ~/Documents, then that would mean ~/Documents/.linuxbrew/. Not at all what you want.The second one doesn't really work either, because of how quoting works. Expanding ~ is something the shell is expected to doit generally shouldn't actually make it into an environment variable. But by quoting it, you've prevented that expansion. You need to leave the ~/ bit out of the quotes, or alternative use $HOME (which will expand inside double-quotes. So, either of these should work (at least if $HOME is set to your home directory, which it almost always is):HADOOP_HOME=$HOME/.linuxbrew/Cellar/hadoop/2.7.3/libexec/etc/hadoop/HADOOP_HOME=~/.linuxbrew/Cellar/hadoop/2.7.3/libexec/etc/hadoop/Personally, I find the first one easier to read. There is a third optionyou don't actually need any quoting here; there aren't any special characters in the name. So this is fine (and perfectly readable) too:HADOOP_HOME=~/.linuxbrew/Cellar/hadoop/2.7.3/libexec/etc/hadoop/Remember to export the variable as well (export HADOOP_HOME).