Environment variables: it stores information of the operating system or programs. Environment variables get set automatically after startup. For example, PATH environment variable tells the shell where to search the executable files.
Printing them to terminal: printenv, set
but particular environment variables can be displayed too: printenv PATH
to set up an environment variable: set VAR1=”something” where VAR1 is an arbitrary variable
to delete an environment variable: unset var1
displaying a particular one(same as printenv basically): echo $VAR1
to have the setting in the system permanently: export VAR1=”valami”
we can create an own command under /home/bin folder, but it works only if we added the folder to PATH environment variable:
export PATH=$PATH:~/bin, and to make it permanent in .bashrc:echo "export PATH=$PATH:~/bin" >> ~/.bashrc
Thottee explained it on his website in more detail that what we do exactly (his website is in hungarian so you may need to translate it with a translator program: http://linuxkezdoknek.hu/articles.php?article_id=33 (the article's second half)