$$\text{R--OH} + \text{SOCl}_2 \to \text{R--Cl} + \text{SO}_2 \uparrow + \text{HCl} \uparrow$$
Concept: Alcohols react with thionyl chloride to form alkyl chlorides. This is the best method for preparing alkyl chlorides because both byproducts ($$\text{SO}_2$$ and $$\text{HCl}$$) are gaseous and escape easily, leaving behind the pure product without complex purification steps.
- Reaction in the presence of pyridine proceeds via the $$S_N2$$ pathway with inversion.
- Reaction without pyridine proceeds via the internal substitution pathway with retention of configuration.