The thing doesn't work basically. Upon installation, mkdir -p $FOAM_RUN doesn't work because $FOAM_RUN hasn't been activated. In my case openfoam was installed into /usr/share/openfoam. Therefore, in order to activate $FOAM_RUN I had to manually add a line source /usr/share/openfoam/etc/bashrc to the end of the bashrc file wich is situated in my home directory (or just run it as a bash code as explained here https://www.cfd-online.com/Forums/openfoam-installation/214293-cant-find-openfoam-directory-ubuntu-windows-10-a.html) . Once I did that, all the commands like "icoFoam -help" started working but "mkdir -p $FOAM_RUN" didn't work still. I figured it was because my installation directory (/usr/share/openfoam) was missing "bin" folder with necessary files! I decided to fix it by going directly to the OpenFOAM GitLab page and just download the bin folder. I did it but that still didn't help: I am getting an error that though the necessary files are not missing anymore, they haven't been compiled. If I knew how to compile them manualy I would've completed OpenFOAM isntallation. But I don't know. That's where I am giving up on it, removing OpenFOAM from my computer and am going to go see if I'll have luck with The OpenFOAM Foundation.