(Looking more closely at that last one they are lucky they took this in pre-social media days, I’m sure posting that kind of gun safety online while in uniform would result in disciplinary action )
Clues from the displayed firearms: rifle appears to be an M1903, which was in Infantry service from 1903 to 1936. The pistol is an M1911, in service from 1911 to 1985 as a standard sidearm.
So, from 1911 to 1936. The uniforms suggest to me the earlier end of that time range.
Without insignia I doubt we can guess what unit it was and I don’t think there is enough detail to suggest a location either (they seem different places too).
I’m not terribly conversant with military history, but the fact that they’re wearing what appear to be gaiters (rather than puttees) in the third photo would suggest late WWI or after.
In the last photo, the goofball in the barracks cover is wearing 1910 leggings; the two in campaign hats are in 1916 dismounted branches leggings. Patch pockets replaced bellows pockets on the tunics after 1912.