1. An X-ray source, adapted to provide an X-ray, the X-ray source comprising: a housing comprising an end window, wherein the X-ray is emitted out of the housing through the end window; an anode target disposed beside the end window and adapted to rotate around an axis; a cathode disposed in the housing and adapted to provide an electron beam, wherein a portion of the electron beam hits the rotating anode target to generate the X-ray that passes through the end window; and a shielding unit comprising an opening and disposed on a traveling path of the electron beam and between the cathode and the anode target for shielding another portion of the electron beam, wherein the portion of the electron beam that hits the anode target passes through the shielding unit through the opening of the shielding unit.