Emacs init file location in Microsoft Windows

By Xah Lee. Date: . Last updated: .

On {Windows 11, Windows 10, Windows 8, Windows 7, Windows Vista} , by default, emacs looks at the following directory/file.

$HOMEPATH/AppData/Roaming/.emacs.d/init.el
The .emacs.d/init.el is modern convention.
$HOMEPATH/AppData/Roaming/.emacs
The .emacs file is old emacs convention, used in 1990s and 2000s.

If you have the environment variable named HOME, then it's at:

$HOME/.emacs.d/init.el

or

$HOME/.emacs

🛑 WARNING: HOME should not be confused with HOMEPATH.

Reference

Emacs on Microsoft Windows