add path to $path linux with $HOME code example Example: how to add a path variables in linux export PATH=/usr/java/<JDK Directory>/bin:$PATH.