Green’s Dictionary of Slang

devil, the phr.

1. [late 15C+] used to intensify a var. of questions; an early var. on hell, the phr. (1); often as how the devil...? phr.; what the devil...? phr.; where the devil...? phr.; who the devil...? phr.

2. [17C+] a general intensifier used to express anger, annoyance, impatience; an early var. on hell, the phr. (2)