Shell and environment variables are case-sensitive (as steeldriver says). Home
is not the same variable as HOME
. The HOME
environment variable contains a path to your home directory. The Home
variable typically does not exist; there is nothing special about the name Home
.
When a variable is not defined, performing parameter expansion on it yields the empty string (as vanadium alludes to), which is what you're seeing.
Replacing $Home
with $HOME
should fix the problem:
export PATH="$HOME/gg/gamit/bin:$HOME/gg/kf/bin:$HOME/gg/com:$PATH"
Note that you should not typically set environment variables, especially PATH
, in ~/.bashrc
, because:
- That file is only sourced by
bash
shells, so they will be unavailable in a number of important contexts including graphical programs not started from bash
.
- That file is sourced by all interactive
bash
shells, so when you start one interactive bash shell from another, the child shell will have the path modified again. So the directory name will be prepended multiple times. The performance impact is negligible but it can be quite confusing when you're inspecting the variable's value.
If you want to set or modify an environment variable like PATH
by editing a file that is sourced by shells, you can use ~/.profile
rather than ~/.bashrc
.
(I say "especially PATH
" because it is very common to include the old value of PATH
in the new value, as you are doing, and when this is done in ~/.bashrc
it creates the annoyance described in #2 above.)
$HOME
is a recognised variable -$Home
is not – steeldriver Nov 23 '19 at 12:58