Shunting, in railway operations, is the process of sorting items of into complete trains, or the reverse. In the United States this activity is known as "switching".
Motive power is normally provided by a locomotive known as a shunter (in the UK) or switcher (in the USA). Most shunter/switchers are now diesel-powered but steam and even electric locomotives have been used. Where locomotives could not be used (e.g. because of weight restrictions) shunting operations have in the past been effected by horses or capstans.
A heavy steam shunting locomotive, SR Z class, Great Britain
Light dual-mode (electric and diesel) shunter SBB Tem 346 at work on the Swiss Federal Railways.
Railway shunting capstan found at site of former Hull and Barnsley Railway sidings south of Springhead works.
A CIE 141 Class shunting the Enterprise rolling stock to enable a NIR Class 111 to haul a service from Dublin Connolly to Belfast Central in 1985.
The terms "shunter" and "switcher" are applied not only to locomotives but to employees engaged on the ground with shunting/switching operations. The task of such personnel is particularly dangerous because not only is there the risk of being run over, but on some railway systems—particularly ones that use buffer-and-chain/screw coupling systems—the shunters have to get between the wagons/carriages in order to complete coupling and uncoupling. This was particularly so in the past. The Midland Railway company, for example, kept an ambulance wagon permanently stationed at Toton Yard to give treatment to injured shunters.