Emacs Init: File Location
Where is Init File
Emacs Init File Location On Linux and Mac
By default, there is no init file. You have to create the file yourself, and add emacs lisp code to it.
On linux and Mac, by default, emacs look for init file at the following filepath, in order:
~/.emacs
~/.emacs.el
~/.emacs.d/init.el
(this is preferred since ~2010)~/.config/emacs/init.el
(linux conventionXDG_CONFIG_HOME
environment variable, supported since Emacs 27 (date 2020).)
Emacs Init File Location on Microsoft Windows
Variable of Emacs Init File Location
Start emacs,
type
Alt+x describe-variable
, then type
user-emacs-directory
it'll show the init file path emacs is looking for.