In mechanical and civil engineering, a peg or bar designed to fasten machine and structural components together or to keep them aligned.
Dowel pins are used to keep machine components aligned, sometimes without making a rigid joint (as in a pin-connected truss). Taper pins are used to fix the hub of a gear or a pulley to a shaft. Split cotter pins prevent nuts from turning on bolts and keep loosely fitting pins in place. The clevis pin has a ridge at one end and is kept in place by a cotter pin inserted through a hole in the other end. Many other types of pins are used in various machines.