The obvious answer is a linkage up to the head set, and down to the wheels.
Hydraulics would be viable as well.
However any power transfer system will lose power, which cyclists do not have in excess, which is probably why it has not been done.
bicycles.stackexchange.com/users/3924/mattnz
It has been done,is being done and is wildly accepted by the few who feel the need for and have the wallet for, a two wheel drive bicycle.
A google search for two wheel drive bicycle will yield enough hits to keep you busy for a few hours.
Every one I have seen is flexible shaft drive.
The shaft is driven by a gear mounted where the rear disc would be and a similar arrangement on the front.
A flexible drive shaft connects the two gears.
Maybe someday it will be the norm but for now it is more of a curiosity, hey people thought 29ers were a fad.
bicycles.stackexchange.com/users/3083/mikes
My friend Chad Harrington out of Chula Vista made one back in 1993.
It didn't really catch on, but it will give you an idea of how to make one.
I doubt that phone number is still active, but I wonder if "Turner Drive Systems" is still in existence for some input.
You can also read a little about it at BMXMuseum.com
bicycles.stackexchange.com/users/3949/BillyNair
Offhand, I can't think of a way this could work; the reason you can have all-wheel drive on a car is because of the differential gear .
With one wheel in front of the other and the drive mechanism placed between them along the axis of travel there's no simple way to do it and still have a turnable front wheel.
The penny farthing was able to apply the drive force to the front wheel by having the user sit almost completely on top of it, but the rear wheel still remained fixed.
The large front wheel is a function of not being able to use gearing to increase the torque / rotation speed; in other words, every time the center of the wheel (with the pedals) spun once, the outside of the wheel spun once .
This wasn't very efficient, however.
The only other method I could think of would be to have some kind of flexible shaft driving the turnable wheel, but the loss in torque / speed would be huge.
Technically the trike below has two-wheel drive, but it's also technically not a "bicycle" in that it's got more than two wheels.
It's an interesting thought exercise.
If you don't mind me asking, what would be the benefit of a two-wheel (front and back) drive bike?
the power output would remain the same - one dude, pushing as hard as he can, will still only output one "dude-power" ("dude-power" is the amount of energy you get by burning Jeff Bridges.
It's equivalent to about one-third of a "Walter-hour").
The small footprint of a bike won't gain anything appreciable from being able to apply torque to a different wheel (just lean back to get more traction).
bicycles.stackexchange.com/users/2362/lawndartcatcher
Somehow power needs to be transmitted to the front wheel without creating torque on the steering axis.
There are various differential (coaxial shaft) schemes that would sorta work (hard to believe, though, that they'd not have so much friction as to generate unacceptable steering torque), or one could use a belt drive with a belt that could twist on itself.
A flat belt running through the steering tube (perhaps with guides inside the tube where it would tend to twist on itself when turning) and attached to a drive pulley at the top would probably work, though it would be exceedingly awkward.
Also exceedingly awkward but worth a mention is "windmill" drive. Have a reciprocating shaft running down the steering tube, operating a crank on the front wheel, and driven by a crank axle above.
This is the inverse of your standard windmill water pump where the reciprocating shaft from the windmill drives a water pump below.
The other option is electric drive.
In fact, most electric-assist bikes already have, in effect,
2-wheel drive.
One could add a generator to the back wheel to supply power to the front (in place of a battery), similar to the electric drive of submarines, diesel locomotives, and large military trucks.
bicycles.stackexchange.com/users/1584/Daniel R Hicks
We did this in 1996 with a differential mechanism and by nullifying the torque at the steering.
It was quite successful with various advantages like easy drive the sandy road /
muddy / loose gravel without skidding, and no skidding of bike by turning the steering at max of 90 degree even at high speed.
The bike was designed to take different speed automatically at both rear and front while turning and the speed can be doubled without at having gears at rear wheel.
But it was heavy because of metal gears.
It was tested by TI cycles of India, a commercial Bicycle manufacturer in India.
bicycles.stackexchange.com/users/27021/T S Govindarajan
A two wheel drive bike is a bike without a motor that can still turn. The front and back wheel both get power. How does a bike with this type of drivetrain work?
How does a two wheel drive bike work?
bicycles.stackexchange.com
<wheels><drivetrain>
bicycles.stackexchange.com/questions/10821
bicycles.stackexchange.com/users/4789/John
It has been done,is being done and is wildly accepted by the few who feel the need for and have the wallet for, a two wheel drive bicycle.  However, for most people now, it is still a fad. There are various ways of building a two wheel drive bike, all of which are rather awkward and most cyclists consider they bring little in terms of performance, as the power is still supplied by one person pedalling. Short of adding a power supply to the back wheel, there is no way there would be a real increase in performance. There are several possible implementations of this idea, as can be seen from a Google search. This would generally require a flexible shaft connecting the drive to the front wheel, and would add complexity and weight while sacrificing efficiency and without necessarily improving performance. Other options include a belt drive, but all fail to increase the power output and the benefit of added traction is less appreciable on a bike and more easily achieved by shifting your weight.
There are several possible implementations of this idea, as can be seen from a Google search. This would generally require a flexible shaft connecting the drive to the front wheel, and would add complexity while sacrificing efficiency and without necessarily improving performance. Other options include a belt drive, but all fail to increase the power output and the benefit of added traction is less appreciable on a bike and more easily achieved by shifting your weight.