Locomotives and trainsets of Sri Lanka Railways consist mostly of diesel locomotives and multiple units. Steam locomotives are no longer used, except on heritage trains, such as the Viceroy Special.
The first locomotives pulled trains on the original segment of the Main Line, on 54 kilometres (34 miles) connecting Colombo and Ambepussa. In 1953, Sri Lanka Railways enhanced its service to more power with diesel locomotives. Since then, various types of diesel locomotives were added to the service.
Sri Lanka's first railway locomotive was Leopold, in 1864. It was one of seven 4-4-0 locomotives built that year for the Ceylon Government Railway by Robert Stephenson and Company (nos. 1–5) and Beyer, Peacock and Company (nos. 6 and 7). Many more steam locomotives were added to the system, through to the 1950s. All the steam locomotives bar three were manufactured in the United Kingdom; the exceptions were three 4-4-0s built at the railway's Maradana Works near Colombo in 1900 and 1905. In 1938, locomotives were reclassified, based on wheel arrangement and gauge. Sub-classification was based on weight, modifications, heating type, boiler capacity, or other features.
Throughout its history, Ceylon Government Railway had 410 steam locomotives.
The Railways upgraded its service to diesel locomotives, under the leadership of B. D. Rampala in the mid 1950s. In 1953, the first locomotives from British builder Brush Bagnall were imported. Since then, the Railways have imported locomotives from Canada, Japan, West Germany, India, France, and China
In the 1990s, Sri Lanka Railways converted the narrow gauge (2 ft 6 in (762 mm)) Kelani Valley line into broad gauge (5 ft 6 in (1,676 mm)). This was the last narrow gauge line left in Sri Lanka, and its conversion to broad gauge put the fleet of narrow gauge locomotives out of use. All operational locomotives in the country today are broad gauge.
As of August 2011, Sri Lanka does not have commercially operational electric locomotives or train sets. Electrification has been proposed, to improve energy efficiency and sustainability.
Sri Lanka's locomotives have appeared in several different liveries over the years.
The steam locomotives were mainly black.
With the introduction of diesel locomotives, coloured liveries appeared. Typical for many locomotives is a livery that has thick horizontal bands of dark blue, light blue, silver and a yellow stripe. Also common for many locomotives is a livery of horizontal bands of green, brown, and a yellow stripe. Various other liveries also exist. M6 ICE locomotives have a unique ICE livery of brown and orange.
The DMUs are painted in various liveries, unique to their classes. Typically they feature horizontal bands of colour running their entire length and a solid colour on the front and back ends.
Steam locomotives were numbered from 1 upwards, reaching 161 in 1911. Whereafter replacement locomotives were given the same number as the locomotive that they replaced with an "R" prefix; until such time as the old locomotive, now running with an "O" prefix, was finally withdrawn. This system was abandoned in 1928, with new locomotives being numbered from 249 upwards, and reaching 336 by 1940, and 362 in 1951 when the last steam locomotive — a 4-8-0 from W. G. Bagnall — was delivered.
Narrow gauge locomotives were numbered in the same list as broad gauge locomotives. Diesel locomotives and multiple unit numbering started from 500 – an Armstrong Whitworth 122 hp 0-4-0 diesel-electric shunter delivered in 1934 – and reached 840 in 1991. and included one locomotive experimentally converted to electric traction.
Steam locomotives were used on regular services until the 1970s.
Diesel locomotives of Sri Lanka Railway are categorized into several classes and their sub classes.
Note: One class N2 locomotive was re-classified as Class E1 after fitting with Alstom pantographs, to be run under electric power. Not to be confused with the steam locomotive E1, this electric locomotive is not in commercial use. One class P1 locomotive was at Viharamahadevi (Victoria) Amusement Park
S1–S8 Diesel Hydraulic Multiple Units, S9–S12 Diesel Electric & Electro-Diesel Multiple Units
The various Railbus units that are currently operated are not listed below.
Some other diesel locomotives (typically shunters) are available and operated in Sri Lanka other than the locomotives and shunters owned by Sri Lanka Railways. Some are the locomotives owned by Sri Lanka Ports Authority and Holcim Sri Lanka limited.
In 2013, the railways ordered new trainsets from CSR to replace locomotive-hauled trains. They would replace an aging fleet of locomotives.Long-haul S13 DMUs from China's CSR Corporation Limited