hole (n.)youdaoicibaDictYouDict[hole 词源字典]
Old English hol "orifice, hollow place, cave, perforation," from Proto-Germanic *hul (cognates: Old Saxon, Old Frisian, Old High German hol, Middle Dutch hool, Old Norse holr, German hohl "hollow," Gothic us-hulon "to hollow out"), from PIE root *kel- (2) "to cover, conceal" (see cell).

As a contemptuous word for "small dingy lodging or abode" it is attested from 1610s. Meaning "a fix, scrape, mess" is from 1760. Obscene slang use for "vulva" is implied from mid-14c. Hole in the wall "small and unpretentious place" is from 1822; to hole up first recorded 1875. To need (something) like a hole in the head, applied to something useless or detrimental, first recorded 1944 in entertainment publications, probably a translation of a Yiddish expression such as ich darf es vi a loch in kop.[hole etymology, hole origin, 英语词源]
shack (n.)youdaoicibaDictYouDict
1878, American English and Canadian English, of unknown origin, perhaps from Mexican Spanish jacal, from Nahuatl (Aztecan) xacalli "wooden hut." Or perhaps a back-formation from dialectal English shackly "shaky, rickety" (1843), a derivative of shack, a dialectal variant of shake (v.). Another theory derives shack from ramshackle.

Slang meaning "house" attested by 1910. In early radio enthusiast slang, it was the word for a room or office set aside for wireless use, 1919, perhaps from earlier U.S. Navy use (1917). As a verb, 1891 in the U.S. West in reference to men who "hole up" for the winter; from 1927 as "to put up for the night;" phrase shack up "cohabit" first recorded 1935 (in Zora Neale Hurston).