Recently, high-precision radiotherapy systems have been developed by integrating computerized tomography or magnetic resonance imaging to enhance the precision of radiotherapy. For integration with additional imaging systems in a limited space, miniaturization and weight reduction of the linear accelerator (linac) system have become important. The aim of this work is to develop a compact medical linac based on 9.3GHz X-band RF technology instead of the S-band RF technology typically used in the radiotherapy field. The accelerating tube was designed by 3D finite-difference time-domain and particle-in-cell simulations because the frequency variation resulting from the structural parameters and processing errors is relatively sensitive to the operating performance of the X-band linac. Through the 3D simulation of the electric field distribution and beam dynamics process, we designed an accelerating tube to efficiently accelerate the electron beam and used a magnetron as the RF source to miniaturize the entire linac. In addition, a side-coupled structure was adopted to design a compact linac to reduce the RF power loss. To verify the performance of the linac, we developed a beam diagnostic system to analyze the electron beam characteristics and a quality assurance (QA) experimental environment including 3D lateral water phantoms to analyze the primary performance parameters (energy, dose rate, flatness, symmetry, and penumbra) The QA process was based on the standard protocols AAPM TG-51, 106, 142 and IAEA TRS-398. The X-band linac has high shunt impedance and electric field strength. Therefore, even though the length of the accelerating tube is 37cm, the linac could accelerate an electron beam to more than 6MeV and produce a beam current of more than 90mA. The transmission ratio is measured to be approximately 30% ~ 40% when the electron gun operates in the constant emission region. The percent depth dose ratio at the measured depths of 10 and 20cm was approximately 0.572, so we verified that the photon beam energy was matched to approximately 6MV. The maximum dose rate was measured as 820cGy/min when the source-to-skin distance was 80cm. The symmetry was smaller than the QA standard and the flatness had a higher than standard value due to the flattening filter-free beam characteristics. In the case of the penumbra, it was not sufficiently steep compared to commercial equipment, but it could be compensated by improving additional devices such as multileaf collimator and jaw. A 9.3GHz X-band medical linac was developed for high-precision radiotherapy. Since a more precise design and machining process are required for X-band RF technology, this linac was developed by performing a 3D simulation and ultraprecision machining. The X-band linac has a short length and a compact volume, but it can generate a validated therapeutic beam. Therefore, it has more flexibility to be coupled with imaging systems such as CT or MRI and can reduce the bore size of the gantry. In addition, the weight reduction can improve the mechanical stiffness of the unit and reduce the mechanical load.