1862, "hut, shed, shelter," perhaps an alteration of shebeen (q.v.). Phrase the whole shebang first recorded 1869, but relation to the earlier use of the word is obscure. Either or both senses may also be mangled pronunciations of Fr. char-à-banc, a bus-like wagon with many seats.
/sh*-bang/ n. The character sequence "#!" that frequently begins executable shell scripts under Unix. Probably derived from "shell bang" under the influence of American slang "the whole shebang" (everything, the works).