For the CERN LHC experiments, Atlas and CMS, Luminosity (determined by the particle flux density) is one of the most important beam parameters. Therefore, an upgrade program of the LHC injector chain has been launched, replacing amongst others the existing Proton linac (Linac2) by a new H- linac (Linac4). In the framework of my Ph.D. thesis, I worked on the commissioning with beam of the front-end components of Linac4. A short summary of the Linac4 design, the commissioning and solutions to problems encountered during commissioning will be presented. The second part of the talk will be focused on a future Lepton collider project CLIC (Compact Linear Collider) optimised to complement the LHC research. An overview of its unique design and the related unique beam dynamics will be presented. In order to ensure a safe beam operation first machine protection studies based on its beam dynamics were conducted and summarized.