Officers of the 153rd New York Infantry with their dog-Library of Congress
Although technically against orders, soldiers acquired pets of all manner of species during the war.
“Nearly every company, certainly every regiment, in the Army of the Potomac, had a pet of some kind or other. It mattered not whether the object of their affection was a dog, cat, possum, cow, or horse – of whatever name or species the brute was loved by all, and woe be to the outsider who dared to insult or injure one of these pets… Occasionally these pets became great heroes in their way, and then they became general favorites in the whole army.”
As explained in Richard Miller Devens’s Pictorial Book of Anecdotes and Incidents of the War of the Rebellion