An ocean liner is a passenger ship primarily used as a form of transportation across seas or oceans. Ocean liners may also carry cargo or mail, and may sometimes be used for other purposes (such as for pleasure cruises or as hospital ships).
Cargo vessels running to a schedule are sometimes called liners. The category does not include ferries or other vessels engaged in short-sea trading, nor dedicated cruise ships where the voyage itself, and not transportation, is the primary purpose of the trip. Nor does it include tramp steamers, even those equipped to handle limited numbers of passengers. Some shipping companies refer to themselves as "lines" and their container ships, which often operate over set routes according to established schedules, as "liners".
Ocean liners are usually strongly built with a high freeboard to withstand rough seas and adverse conditions encountered in the open ocean. Additionally, they are often designed with thicker hull plating than is found on cruise ships, and have large capacities for fuel, food and other consumables on long voyages.
The first ocean liners were built in the mid-19th century. Technological innovations such as the steam engine and steel hull allowed larger and faster liners to be built, giving rise to a competition between world powers of the time, especially between the United Kingdom, the German Empire, and to a lesser extent France. Once the dominant form of travel between continents, ocean liners were rendered largely obsolete by the emergence of long-distance aircraft after World War II. Advances in automobile and railway technology also played a role. After Queen Elizabeth 2 was retired in 2008, the only ship still in service as an ocean liner is RMS Queen Mary 2.