In the "Show Applications" tab in Ubuntu it is possible to group icons together using the create a folder and then add to folder option in the Ubuntu Software (which is described in detail here)
However, since I often reinstall my system, I was wondering if it were possible to do this using terminal, or by editing menu's configuration file hidden in depths of the system folders? This would automate the whole thing and save me a lot of time by not doing it manually.