To recap everything mentioned in this question,
export line means that the variable that you declare after it will be accessible to child processes. In other words, processes will be able to access the variable declared after the
export keyword through the shell's environment. So, if you did something like
export FOO="BAR" and then sourced the changes in your shell environment, you could type
$FOO and get
The path line is just as you stated: it's declaring a variable that's named
PATH for the shell environment. In the bash environment,
PATH has a special purpose of defining where the computer looks for programs is. This lets you type custom commands for scripts without typing the full directory. Note that PATH is marked for export by default, so this line doesn't have to be rewritten. It doesn't hurt, though.
$HOME in the
At the beginning of the path that is assigned to the
$HOME is declared. This means that the computer will pretty much grab the value stored in
HOME and copy-paste it in front of the rest of the line when reading it.
: in between both paths
: is equivalent to a comma in sentences. It just separates the three directories. Without those three directories, the console would not recognize the commands it receives. Those three places are the three directories that are most commonly used for scripts/command files to be stored and therefore should be accessible by the terminal without having to write out the full path to the file.