"one who occupies the same tent," 1842, from Latin contubernalis "tent-companion, comrade," noun use of adjective, from assimilated form of com "with, together" (see con-) + taberna "hut, tent" (see tavern).
word-forming element meaning "together, with," sometimes merely intensive; it is the form of com- used in Latin before consonants except -b-, -p-, -l-, -m-, or -r-. In native English formations (such as costar), co- tends to be used where Latin would use con-.
late 13c., "wine shop," later "public house" (mid-15c.), from Old French taverne (mid-13c.) "shed made of boards, booth, stall," also "tavern, inn," from Latin taberna "shop, inn, tavern," originally "hut, shed, rude dwelling," possibly [Klein] by dissimilation from *traberna, from trabs (genitive trabis) "beam, timber," from PIE *treb- "dwelling" (source also of Lithuanian troba "a building," Old Welsh treb "house, dwelling," Welsh tref "a dwelling," Irish treb "residence," Old English ðorp "village, hamlet, farm, estate"). If so, the original meaning probably was "wooden shed."
<a href="https://www.etymonline.com/word/contubernal">Etymology of contubernal by etymonline</a>
Harper, D. (n.d.). Etymology of contubernal. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/contubernal