to know [something] like the back of [your] hand.
(a) know-all
or
know-it-all
to know [something] by heart.
to know better.
For all I know ...
to know what's good for [you]
to learn the hard way
to learn the ropes
to learn a thing or two
to learn to live with [it]