I assume you know that you can edit menus by right clicking main menu bar.You can edit your menu system as you want using that way very easily.But do you know that where these configurations are saved in your machine. Knowing these locations are really helpful when you want edit the menu system by script or if you want to make the exact menu system in another machine.
So here are the locations you should know.
applications.menu file location: ~/.config/menus/
.directory files location: ~/.local/share/desktop-directories/
.desktop files location: ~/.local/share/applications/
if you want to create the same menu system in another machine it is a matter of copying all those files into relevant locations of that machine.
Also remember to execute the following comamnd after file copying.
sudo killall gnome-panel