Emacs: Command Line Options

By Xah Lee. Date: . Last updated: .

here's the most useful emacs command line options.

Do Not Load Init

--no-init-file or -q
Do not load Emacs Init File, nor global users init default.el.
--no-site-file
Do not load the site-wide init file site-start.el
-Q or --quick
same as --no-init-file --no-site-file --no-splash.

Load a Different Init

emacs -q -l InitFilePath
load a different init.

Start emacs without loading previously opened files

--no-desktop
start emacs without loading previously opened files. [see Emacs Init: Restore Opened Files (desktop-save-mode)]

this is useful when you have a corrupt desktop file.

Load Emacs Lisp Files

--load=path or -l path
Run the elisp file at path.
--batch
  • Do not launch emacs as a editor.
  • Do not load user init.
  • Usually used together with --load
--script path

same as --batch and --load

Start emacs in terminal

--no-window-system or -nw
start emacs in terminal.

Reference

Emacs, start up and init files