Starting emacs in dired mode

Posted by: Seth Lakowske

Published:

You can start emacs in dired mode by adding this to your startup script

(dired ".")
Next time you start emacs, the dired command will run, starting emacs in dired mode at the current working directory.

Another way to start emacs in dired mode, is to execute an expression from the command line, e.g.

emacs --execute='(dired "~/")'
This starts emacs and executes the dired command, starting emacs in dired mode

Lastly, a simple way is to just pass the directory to emacs, e.g.

emacs .
Starting emacs in dired mode at the current working directory.