In the kitchen I strongly recommend Kitchen Cabinet Hanging Rail with adjustable hangers. The rail comes in lengths that you can fit to run all along the wall, they have lots of screw holes so there need never be a pipe or cable in the way. You can fit the cabs anywhere along the length so can position them to suit, or move them around if you want with no need to drill again.
When you start drilling you will find out if it is plaster on blocks, or if it is plasterboard which will likely have a gap behind it. Your screws and plugs must go well into the blocks.
In the bathroom you can use individual hangers if you want, though the rail is stronger, especially on a plasterboard wall where you can probably catch a couple of studs with your screws.
The rail is usually galvanised steel and you can prime it (after cutting but before fitting) and paint it to match the wall.