Firearms began as bamboo tubes of gunpowder strapped to spears
The ancestor of every rifle and pistol was a Song dynasty invention: a bamboo tube packed with gunpowder and pellets, lashed to a spear so one soldier could carry it. This fire lance proved its worth at the siege of De'an in 1132, and within two centuries metal-barrelled descendants had spread across Eurasia.
A firearm fires projectiles using the high-pressure gas from rapidly burning propellant. Its story begins in tenth-century China with the fire lance. In the thirteenth century metal tubes replaced bamboo, creating the hand cannon, and during the fourteenth century the technology travelled across Eurasia by routes historians still know little about. Early weapons burned black powder. From the 1860s it gave way to smokeless powder, mostly nitrocellulose, which turns almost entirely into gas and so leaves little smoke.
Most modern guns, apart from smoothbore shotguns, have rifled barrels whose spiral grooves spin the bullet to keep it stable in flight. Classification gets detailed quickly. Handguns and rifles are measured by bore diameter in millimetres or inches, shotguns by gauge. Weapons are also sorted by action, from muzzleloaders and bolt actions to revolvers and fully automatic designs, and by ignition, a lineage running from matchlock and wheellock through flintlock and percussion cap to modern rimfire and centrefire cartridges, with rare electronic systems too.
Militaries divide firearms by portability. Light weapons can be carried by foot soldiers, even if some work best with a crew; heavy ones need a mount, carriage, vehicle, ship or aircraft because of their weight or recoil. Small arms are the light weapons one soldier can operate fully alone, a class taking in pistols and revolvers as well as rifles, shotguns, submachine guns and light machine guns.
Range varies enormously. Handguns and shotguns are generally effective within about 100 metres, while most rifles are accurate to around 500 metres with iron sights and further with optics. Specialised sniper and anti-materiel rifles can hit targets beyond 2,000 metres, and a bullet stays dangerous well past its accurate range. Major makers are spread worldwide, from Glock in Austria to Beretta in Italy, and the word firearm itself carries different legal definitions from country to country.
Source: Firearm