In this study, a novel linear encoder (LE) based on “common-optical-path” design is proposed for displacement measurement. The system configuration of the proposed LE is simple and can be easy to setup, it consists of a laser diode (LD) light source, V-shape prism, beam-splitter, mirror and grating. According to our proposed method, the beams of reference and measurement can be obtained when a light beam outcoming from the LD passes through a specified V-shape prism. By using the design concept of common-optical-path, the reference and measurement beams will move together, which means the two beams will suffer from the same environmental disturbances. Surrounding disturbances can then be compensated in the interference signal making the system much less sensitive to environmental disturbances. Moreover, the proposed LE also takes advantage of a “double-diffraction” optical configuration, which directs diffracted beams to propagate a grating twice, thereby enhancing the phase change induced by grating displacement, effectively improving the sensitivity of the LE. By means of measuring the phase variations of the interfering signals resulting from the moving grating, the displacement information can be acquired. Based on the experimental results, the proposed LE has the ability to measure large displacements with a resolution of 1.7 nm. The repeatability of the system was found to be less than 1.9 nm together with a long-term stability of about 11.1 nm.