# Gun

A gun is a device designed to propel a projectile using pressure or explosive force. The projectiles are typically solid, but can also be pressurized liquid (e.g. in water guns/cannons), or gas (e.g. light-gas gun). Solid projectiles may be free-flying (as with bullets and artillery shells) or tethered (as with Tasers, spearguns and harpoon guns). A large-caliber gun is also called a cannon. Guns were designed as weapons for military use, and then found use in hunting. Now, there are guns, e.g., toy guns, water guns, paintball guns, etc., for many purposes.
The means of projectile propulsion vary according to designs, but are traditionally effected pneumatically by a high gas pressure contained within a barrel tube (gun barrel), produced either through the rapid exothermic combustion of propellants (as with firearms), or by mechanical compression (as with air guns). The high-pressure gas is introduced behind the projectile, pushing and accelerating it down the length of the tube, imparting sufficient launch velocity to sustain its further travel towards the target once the propelling gas ceases acting upon it after it exits the muzzle. Alternatively, new-concept linear motor weapons may employ an electromagnetic field to achieve acceleration, in which case the barrel may be substituted by guide rails (as in railguns) or wrapped with magnetic coils (as in coilguns).
The first devices identified as guns or proto-guns appeared in China from around AD 1000. By the end of the 13th century, they had become "true guns", metal barrel firearms that fired single projectiles which occluded the barrel. Gunpowder and gun technology spread throughout Eurasia during the 14th century.

## Etymology and terminology

The origin of the English word gun is considered to derive from the name given to a particular historical weapon. Domina Gunilda was the name given to a remarkably large ballista, a mechanical bolt throwing weapon of enormous size, mounted at Windsor Castle during the 14th century. This name in turn may have derived from the Old Norse woman's proper name Gunnhildr which combines two Norse words referring to battle. "Gunnildr", which means "War-sword", was often shortened to "Gunna".
The earliest recorded use of the term "gonne" was in a Latin document c. 1339. Other names for guns during this era were "schioppi" (Italian translation-"thunderers"), and "donrebusse" (Dutch translation-"thunder gun") which was incorporated into the English language as "blunderbuss". Artillerymen were often referred to as "gonners" and "artillers" "Hand gun" was first used in 1373 in reference to the handle of guns.

### Definition

According to the Merriam-Webster dictionary, a gun could mean "a piece of ordnance usually with high muzzle velocity and comparatively flat trajectory," " a portable firearm," or "a device that throws a projectile."
Gunpowder and firearm historian Kenneth Chase defines "firearms" and "guns" in his Firearms: A Global History to 1700 as "gunpowder weapons that use the explosive force of the gunpowder to propel a projectile from a tube: cannons, muskets, and pistols are typical examples."

#### True gun

According to Tonio Andrade, a historian of gunpowder technology, a "true gun" is defined as a firearm which shoots a bullet that fits the barrel as opposed to one which does not, such as the shrapnel shooting fire lance. As such, the fire lance, which appeared between the 10th and 12th centuries AD, as well as other early metal barrel gunpowder weapons have been described as "proto-guns" Joseph Needham defined a type of firearm known as the "eruptor," which he described as a cross between a fire lance and a gun, as a "proto-gun" for the same reason. He defined a fully developed firearm, a "true gun," as possessing three basic features: a metal barrel, gunpowder with high nitrate content, and a projectile that occluded the barrel. The "true gun" appears to have emerged in late 1200s China, around 300 years after the appearance of the fire lance. Although the term "gun" postdates the invention of firearms, historians have applied it to the earliest firearms such as the Heilongjiang hand cannon of 1288 or the vase shaped European cannon of 1326.

#### Classic gun

Historians consider firearms to have reached the form of a "classic gun" in the 1480s, which persisted until the mid-18th century. This "classic" form displayed longer, lighter, more efficient, and more accurate design compared to its predecessors only 30 years prior. However this "classic" design changed very little for almost 300 years and cannons of the 1480s show little difference and surprising similarity with cannons later in the 1750s. This 300-year period during which the classic gun dominated gives it its moniker. The "classic gun" has also been described as the "modern ordnance synthesis."

## History
### Proto-gun

Gunpowder was invented in China during the 9th century. The first firearm was the fire lance, which was invented in China between the 10–12th centuries. It was depicted in a silk painting dated to the mid-10th century, but textual evidence of its use does not appear until 1132, describing the siege of De'an. It consisted of a bamboo tube of gunpowder tied to a spear or other polearm. By the late 1100s, ingredients such as pieces of shrapnel like porcelain shards or small iron pellets were added to the tube so that they would be blown out with the gunpowder. It was relatively short ranged and had a range of roughly 3 meters by the early 13th century. This fire lance is considered by some historians to be a "proto-gun" because its projectiles did not occlude the barrel. There was also another "proto-gun" called the eruptor, according to Joseph Needham, which did not have a lance but still did not shoot projectiles which occluded the barrel.

### Transition to true guns

In due course, the proportion of saltpeter in the propellant was increased to maximise its explosive power. To better withstand that explosive power, the paper and bamboo of which fire-lance barrels were originally made came to be replaced by metal. And to take full advantage of that power, the shrapnel came to be replaced by projectiles whose size and shape filled the barrel more closely. Fire lance barrels made of metal appeared by 1276. Earlier in 1259 a pellet wad that filled the barrel was recorded to have been used as a fire lance projectile, making it the first recorded bullet in history. With this, the three basic features of a gun were put in place: a barrel made of metal, high-nitrate gunpowder, and a projectile which totally occludes the muzzle so that the powder charge exerts its full potential in propellant effect. The metal barrel fire lances began to be used without the lance and became guns by the late 13th century.
Guns such as the hand cannon were being used in the Yuan dynasty by the 1280s. Surviving cannons such as the Heilongjiang hand cannon and the Xanadu Gun have been found dating to the late 13th century and possibly earlier in the early 13th century.
In 1287, the Yuan dynasty deployed Jurchen troops with hand cannons to put down a rebellion by the Mongol prince Nayan. The History of Yuan records that the cannons of Li Ting's soldiers "caused great damage" and created "such confusion that the enemy soldiers attacked and killed each other." The hand cannons were used again in the beginning of 1288. Li Ting's "gun-soldiers" or chongzu (銃卒) carried the hand cannons "on their backs". The passage on the 1288 battle is also the first to use the name chong (銃) with the metal radical jin (金) for metal-barrel firearms. Chong was used instead of the earlier and more ambiguous term huo tong (fire tube; 火筒), which may refer to the tubes of fire lances, proto-cannons, or signal flares. Hand cannons may have been used in the Mongol invasions of Japan. Japanese descriptions of the invasions mention iron and bamboo pao causing "light and fire" and emitting 2–3,000 iron bullets. The Nihon Kokujokushi, written around 1300, mentions huo tong (fire tubes) at the Battle of Tsushima in 1274 and the second coastal assault led by Holdon in 1281. The Hachiman Gudoukun of 1360 mentions iron pao "which caused a flash of light and a loud noise when fired." The Taiheki of 1370 mentions "iron pao shaped like a bell."

### Spread

The exact nature of the spread of firearms and its route is uncertain. One theory is that gunpowder and cannons arrived in Europe via the Silk Road through the Middle East. Hasan al-Rammah had already written about fire lances in the 13th century, so proto-guns were known in the Middle East at that point. Another theory is that it was brought to Europe during the Mongol invasion in the first half of the 13th century.
The earliest depiction of a cannon in Europe dates to 1326 and evidence of firearm production can be found in the following year. The first recorded use of gunpowder weapons in Europe was in 1331 when two mounted German knights attacked Cividale del Friuli with gunpowder weapons of some sort. By 1338 hand cannons were in widespread use in France. English Privy Wardrobe accounts list "ribaldis", a type of cannon, in the 1340s, and siege guns were used by the English at Calais in 1346. Early guns and the men who used them were often associated with the devil and the gunner's craft was considered a black art, a point reinforced by the smell of sulfur on battlefields created from the firing of guns along with the muzzle blast and accompanying flash.
Around the late 14th century in Europe, smaller and portable hand-held cannons were developed, creating in effect the first smooth-bore personal firearm. In the late 15th century the Ottoman empire used firearms as part of its regular infantry. In the Middle East, the Arabs seem to have used the hand cannon to some degree during the 14th century. Cannons are attested in India starting from 1366.
The Joseon kingdom in Korea learned how to produce gunpowder from China by 1372 and started producing cannons by 1377. In Southeast Asia, Đại Việt soldiers used hand cannons at the very latest by 1390 when they employed them in killing Champa king Che Bong Nga. Chinese observer recorded the Javanese use of hand cannon for marriage ceremony in 1413 during Zheng He's voyage. Hand guns were utilized effectively during the Hussite Wars. Japan knew of gunpowder due to the Mongol invasions during the 13th century, but did not acquire a cannon until a monk took one back to Japan from China in 1510, and guns were not produced until 1543, when the Portuguese introduced matchlocks which were known as tanegashima to the Japanese.
Gunpowder technology entered Java in the Mongol invasion of Java (1293 A.D.).$^{:1–2}$$^{:220}$ Majapahit under Mahapatih (prime minister) Gajah Mada utilized gunpowder technology obtained from the Yuan dynasty for use in the naval fleet.$^{:57}$ During the following years, the Majapahit army have begun producing cannons known as cetbang. Early cetbang (also called Eastern-style cetbang) resembled Chinese cannons and hand cannons. Eastern-style cetbangs were mostly made of bronze and were front-loaded cannons. It fires arrow-like projectiles, but round bullets and co-viative projectiles can also be used. These arrows can be solid-tipped without explosives, or with explosives and incendiary materials placed behind the tip. Near the rear, there is a combustion chamber or room, which refers to the bulging part near the rear of the gun, where the gunpowder is placed. The cetbang is mounted on a fixed mount, or as a hand cannon mounted on the end of a pole. There is a tube-like section on the back of the cannon. In the hand cannon-type cetbang, this tube is used as a socket for a pole.$^{:94}$

### Arquebus and musket

The arquebus was a firearm that appeared in Europe and the Ottoman Empire in the early 15th century. Its name is derived from the German word Hackenbüchse. It originally described a hand cannon with a lug or hook on the underside for stabilizing the weapon, usually on defensive fortifications. In the early 1500s, heavier variants known as "muskets" that were fired from resting Y-shaped supports appeared. The musket was able to penetrate heavy armor, and as a result armor declined, which also made the heavy musket obsolete. Although there is relatively little to no difference in design between arquebus and musket except in size and strength, it was the term musket which remained in use up into the 1800s. It may not be completely inaccurate to suggest that the musket was in its fabrication simply a larger arquebus. At least on one occasion the musket and arquebus have been used interchangeably to refer to the same weapon, and even referred to as an "arquebus musket." A Habsburg commander in the mid-1560s once referred to muskets as "double arquebuses."
A shoulder stock was added to the arquebus around 1470 and the matchlock mechanism sometime before 1475. The matchlock arquebus was the first firearm equipped with a trigger mechanism and the first portable shoulder-arms firearm. Before the matchlock, handheld firearms were fired from the chest, tucked under one arm, while the other arm maneuvered a hot pricker to the touch hole to ignite the gunpowder.
The Ottomans may have used arquebuses as early as the first half of the 15th century during the Ottoman–Hungarian wars of 1443–1444. The arquebus was used in substantial numbers during the reign of king Matthias Corvinus of Hungary (r. 1458–1490). Arquebuses were used by 1472 by the Spanish and Portuguese at Zamora. Likewise, the Castilians used arquebuses as well in 1476. Later, a larger arquebus known as a musket was used for breaching heavy armor, but this declined along with heavy armor. Matchlock firearms continued to be called musket. They were used throughout Asia by the mid-1500s.

### Transition to classic guns

Guns reached their "classic" form in the 1480s. The "classic gun" is so called because of the long duration of its design, which was longer, lighter, more efficient, and more accurate compared to its predecessors 30 years prior. The design persisted for nearly 300 years and cannons of the 1480s show little variation from as well as surprising similarity with cannons three centuries later in the 1750s. This 300-year period during which the classic gun dominated gives it its moniker.
The classic gun differed from older generations of firearms through an assortment of improvements. Their longer length-to-bore ratio imparted more energy into the shot, enabling the projectile to shoot further. They were also lighter since the barrel walls were thinner, allowing faster dissipation of heat. They no longer needed the help of a wooden plug to load since they offered a tighter fit between projectile and barrel, further increasing the accuracy of firearms – and were deadlier due to developments such as gunpowder corning and iron shot.

### Modern guns

Several developments in the 19th century led to the development of modern guns.
In 1815, Joshua Shaw invented percussion caps, which replaced the flintlock trigger system. The new percussion caps allowed guns to shoot reliably in any weather condition.
In 1835, Casimir Lefaucheux invented the first practical breech loading firearm with a cartridge. The new cartridge contained a conical bullet, a cardboard powder tube, and a copper base that incorporated a primer pellet.

#### Rifles

While rifled guns did exist prior to the 19th century in the form of grooves cut into the interior of a barrel, these were considered specialist weapons and limited in number.
The rate of fire of handheld guns began to increase drastically. In 1836, Johann Nicolaus von Dreyse invented the Dreyse needle gun, a breech-loading rifle which increased the rate of fire to six times that of muzzle loading weapons. In 1854, Volcanic Repeating Arms produced a rifle with a self-contained cartridge.
In 1849, Claude-Étienne Minié invented the Minié ball, the first projectile that could easily slide down a rifled barrel, which made rifles a viable military firearm, ending the smoothbore musket era. Rifles were deployed during the Crimean War with resounding success and proved vastly superior to smoothbore muskets.
In 1860, Benjamin Tyler Henry created the Henry rifle, the first reliable repeating rifle. An improved version of the Henry rifle was developed by Winchester Repeating Arms Company in 1873, known as the Model 1873 Winchester rifle.
Smokeless powder was invented in 1880 and began replacing gunpowder, which came to be known as black powder. By the start of the 20th century, smokeless powder was adopted throughout the world and black powder, what was previously known as gunpowder, was relegated to hobbyist usage.

#### Machine guns

In 1861, Richard Jordan Gatling invented the Gatling gun, the first successful machine gun, capable of firing 200 gunpowder cartridges in a minute. It was fielded by the Union forces during the American Civil War in the 1860s. In 1884, Hiram Maxim invented the Maxim gun, the first single-barreled machine gun.
The world's first submachine gun (a fully automatic firearm which fires pistol cartridges) able to be maneuvered by a single soldier is the MP 18.1, invented by Theodor Bergmann. It was introduced into service in 1918 by the German Army during World War I as the primary weapon of the Stosstruppen (assault groups specialized in trench combat).
In civilian use, the captive bolt pistol is used in agriculture to humanely stun farm animals for slaughter.
The first assault rifle was introduced during World War II by the Germans, known as the StG44. It was the first firearm to bridge the gap between long range rifles, machine guns, and short range submachine guns. Since the mid-20th century, guns that fire beams of energy rather than solid projectiles have been developed, and also guns that can be fired by means other than the use of gunpowder.

## Operating principle

Most guns use compressed gas confined by the barrel to propel the bullet up to high speed, though devices operating in other ways are sometimes called guns. In firearms the high-pressure gas is generated by combustion, usually of gunpowder. This principle is similar to that of internal combustion engines, except that the bullet leaves the barrel, while the piston transfers its motion to other parts and returns down the cylinder. As in an internal combustion engine, the combustion propagates by deflagration rather than by detonation, and the optimal gunpowder, like the optimal motor fuel, is resistant to detonation. This is because much of the energy generated in detonation is in the form of a shock wave, which can propagate from the gas to the solid structure and heat or damage the structure, rather than staying as heat to propel the piston or bullet. The shock wave at such high temperature and pressure is much faster than that of any bullet, and would leave the gun as sound either through the barrel or the bullet itself rather than contributing to the bullet's velocity.

## Components
### Barrel

Barrel types include rifled—a series of spiraled grooves or angles within the barrel—when the projectile requires an induced spin to stabilize it, and smoothbore when the projectile is stabilized by other means or rifling is undesired or unnecessary. Typically, interior barrel diameter and the associated projectile size is a means to identify gun variations. Bore diameter is reported in several ways. The more conventional measure is reporting the interior diameter (bore) of the barrel in decimal fractions of the inch or in millimetres. Some guns—such as shotguns—report the weapon's gauge (which is the number of shot pellets having the same diameter as the bore produced from one English pound (454g) of lead) or—as in some British ordnance—the weight of the weapon's usual projectile.

### Projectile

A gun projectile may be a simple, single-piece item like a bullet, a casing containing a payload like a shotshell or explosive shell, or complex projectile like a sub-caliber projectile and sabot. The propellant may be air, an explosive solid, or an explosive liquid. Some variations like the Gyrojet and certain other types combine the projectile and propellant into a single item.

## Types
### Military

* Long gun
** Arquebus
** Blunderbuss
** Musket
*** Musketoon
*** Wall gun
* Grenade launcher
** Submachine gun
*** Personal defense weapon
** Rifle
*** Anti-materiel rifle
**** Anti-tank rifle
*** Automatic rifle
*** Lever-action rifle
*** Bolt-action rifle
*** Assault rifle
*** Battle rifle
*** Carbine
*** Designated marksman rifle
*** Service rifle
*** Semi-automatic rifle
*** Sniper rifle
** Shotgun
*** Double-barreled shotgun
*** Sawed-off shotgun
*** Pump-action shotgun
*** Combat shotgun
*** Semi-automatic shotgun
*** Automatic shotgun

### Handguns

* Handgun
** Derringer
** Pistol
*** Semi-automatic pistol
*** Machine pistol
*** Service pistol
** Revolver IOF .32 Revolver chambered in .32 S&W Long Smith & Wesson "Military and Police" revolver
*** Service revolver

### Hunting

* Air gun
** BB gun
* Elephant gun
* Express rifle
* Rimfire rifle
* Speargun
* Varmint rifle

### Machine guns

* Gatling gun
** Rotary cannon
** Rotary machine gun
* Ribauldequin
** Nordenfelt gun
* Metal Storm
* Volley gun
** Mitrailleuse
* Machine gun
** General-purpose machine gun
** Light machine gun
*** Squad Automatic Weapon
*** Infantry Automatic Rifle
** Medium machine gun
** Heavy machine gun

### Autocannon

* Autocannon
* Chain gun
* Revolver cannon

### Artillery

* Artillery gun
** Cannon
** Carronade
** Falconet
** Field gun
** Howitzer
** Mortar
** Anti-aircraft gun
** Anti-tank gun

### Tank

* Tank gun

### Rescue equipment

* Flare gun
* Lyle gun

### Training and entertainment

* Airsoft gun
* Cap gun
* Drill Purpose Rifle
* Nerf gun
* Paintball gun
* Potato cannon
* Prop gun
* Spud gun
* Water gun

### Directed-energy weapons

Anti-drone rifle