This thesis designs and researches a linear scanner with high straightness. Use flexible structures to achieve high straightness in Z axis and moveable permanent magnet to reach larger displacement. By analyzing the stress generated by displacement of structures by Ansys, the optimum size of flexible beam can be designed. Then according to the results of simulation, position of magnet, magnetic force, structure of stiffness and mathematical models would be established. Finally, the experimental results present the linear control methods to correct non-linear displacement and scan a 200nm step height sample with 0.5nm resolution successfully.