Powering two Arduino Board with only one regulated power supply

Hi guys, I am recently doing my final year project, I would like to use only one power supply to provides power for two Arduino which Arduino Mega 2560 R3, and Arduino Nano via Dc jack.

Can anyone tell me what to caution? Do I need to connect the gnd pinout from both arduino to Dc jack?
Your help would be greatly appreciated.

I flag the XY problem.

Tell us what you actually need to do.

Why for starters, do you propose to use not one, but two Arduinos?

"could" just splice wires... :smiling_imp:

take 2 power supplies.. cut one.. and splice it into the other.. there ya go.. 1 power for 2 items.. people have been doing that kind of thing for years.. and with much much more current than a couple of arduinos..

and if it doesn't require a wall outlet and your code is small enough.. you could use 2 pro-minis and a couple of battery packs..