The PATH variable specifies a list of directories and their order in which the shell of the system will search for an executable file.
For example echo $PATH ,
/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
Why do I need the part after the colon?
If you write export PATH=~/folder , then the PATH variable will lose the previous value and will be equal only to what is assigned to it. As a result, for example, ls -l will only be accessible via the absolute path /bin/ls -l .
To save the current PATH value, add it after the colon:
export PATH=~/folder:$PATH
or vice versa, before the colon:
export PATH=$PATH:~/folder
As a result, the ~/folder directory will be added to the PATH variable (at the beginning or at the end) while maintaining the previous paths. If ~/folder goes at the beginning, the search will start from this directory, if at the end, then, accordingly, the executable file in it will be hiccupped last (provided that it will not be found in any of the previous directories).
The curly brackets in this case are not fundamental, i.e. will lead to the same result. And so they are needed for the expanded substitution of variables, various calculations and manipulations with values. All this is detailed with examples in the Advanced Bash-Scripting Guide.
echo $VAR. - mkkik