OS Manuals

/usr/bin/emacs

An extensible, customizable, free/libre text editor

From emacs 31.1.90-r0 (os), captured 2026-11-09 by running emacs --help (exit 0). permalink

Usage: /usr/bin/emacs [OPTION-OR-FILENAME]...

Run Emacs, the extensible, customizable, self-documenting real-time
display editor.  The recommended way to start Emacs for normal editing
is with no options at all.

Run M-x info RET m emacs RET m emacs invocation RET inside Emacs to
read the main documentation for these command-line arguments.

Initialization options:

--batch                     do not do interactive display; implies -q
--chdir DIR                 change to directory DIR
--daemon, --bg-daemon[=NAME] start a (named) server in the background
--fg-daemon[=NAME]          start a (named) server in the foreground
--debug-init                enable Emacs Lisp debugger for init file
--display, -d DISPLAY       use X server DISPLAY
--module-assertions         assert behavior of dynamic modules
--dump-file FILE            read dumped state from FILE
--fingerprint               output fingerprint and exit
--seccomp=FILE              read Seccomp BPF filter from FILE
--no-build-details          do not add build details such as time stamps
--no-desktop                do not load a saved desktop
--no-init-file, -q          load neither ~/.emacs nor default.el
--no-loadup, -nl            do not load loadup.el into bare Emacs
--no-site-file              do not load site-start.el
--no-x-resources            do not load X resources
--no-site-lisp, -nsl        do not add site-lisp directories to load-path
--no-splash                 do not display a splash screen on startup
--no-window-system, -nw     do not communicate with X, ignoring $DISPLAY
--init-directory=DIR        use DIR when looking for the Emacs init files.
--quick, -Q                 equivalent to:
                              -q --no-site-file --no-site-lisp --no-splash
                              --no-x-resources
--script FILE               run FILE as an Emacs Lisp script
-x                          to be used in #!/usr/bin/emacs -x
                              and has approximately the same meaning
			      as -Q --script
--terminal, -t DEVICE       use DEVICE for terminal I/O
--user, -u USER             load ~USER/.emacs instead of your own

Action options:

FILE                    visit FILE
+LINE                   go to line LINE in next FILE
+LINE:COLUMN            go to line LINE, column COLUMN, in next FILE
--directory, -L DIR     prepend DIR to load-path (with :DIR, append DIR)
--eval EXPR             evaluate Emacs Lisp expression EXPR
--execute EXPR          evaluate Emacs Lisp expression EXPR
--file FILE             visit FILE
--find-file FILE        visit FILE
--funcall, -f FUNC      call Emacs Lisp function FUNC with no arguments
--insert FILE           insert contents of FILE into current buffer
--kill                  exit without asking for confirmation
--load, -l FILE         load Emacs Lisp FILE using the load function
--visit FILE            visit FILE

Display options:

--background-color, -bg COLOR   window background color
--basic-display, -D             disable many display features;
                                  used for debugging Emacs
--border-color, -bd COLOR       main border color
--border-width, -bw WIDTH       width of main border
--color, --color=MODE           override color mode for character terminals;
                                  MODE defaults to `auto', and
                                  can also be `never', `always',
                                  or a mode name like `ansi8'
--cursor-color, -cr COLOR       color of the Emacs cursor indicating point
--font, -fn FONT                default font; must be fixed-width
--foreground-color, -fg COLOR   window foreground color
--fullheight, -fh               make the first frame high as the screen
--fullscreen, -fs               make the first frame fullscreen
--fullwidth, -fw                make the first frame wide as the screen
--maximized, -mm                make the first frame maximized
--geometry, -g GEOMETRY         window geometry
--no-bitmap-icon, -nbi          do not use picture of gnu for Emacs icon
--iconic                        start Emacs in iconified state
--internal-border, -ib WIDTH    width between text and main border
--line-spacing, -lsp PIXELS     additional space to put between lines
--mouse-color, -ms COLOR        mouse cursor color in Emacs window
--name NAME                     title for initial Emacs frame
--no-blinking-cursor, -nbc      disable blinking cursor
--reverse-video, -r, -rv        switch foreground and background
--title, -T TITLE               title for initial Emacs frame
--vertical-scroll-bars, -vb     enable vertical scroll bars
--xrm XRESOURCES                set additional X resources
--parent-id XID                 set parent window
--help                          display this help and exit
--version                       output version information and exit

You can generally also specify long option names with a single -; for
example, -batch as well as --batch.  You can use any unambiguous
abbreviation for a --option.

Various environment variables and window system resources also affect
the operation of Emacs.  See the main documentation.

Report bugs to bug-gnu-emacs@gnu.org.  First, please see the Bugs
section of the Emacs manual or the file BUGS.
Options (61)
OptionDescriptionSource
--batchdo not do interactive display;help + man
--chdir DIRchange to directory DIRhelp + man
--fg-daemon NAMELike "--bg-daemon", but don't disconnect from the terminal.help + man
--debug-initEnable Emacs Lisp debugger during the processing of the user init file ~/.emacs.help + man
--display, -d DISPLAYCreate the Emacs window on the display specified by displayname.help + man
--module-assertionsassert behavior of dynamic moduleshelp
--dump-file FILEread dumped state from FILEhelp
--fingerprintoutput fingerprint and exithelp
--seccomp FILEread Seccomp BPF filter from FILEhelp
--no-build-detailsdo not add build details such as time stampshelp
--no-desktopDo not load a saved desktop.help + man
--no-init-file, -qload neither ~/.emacs nor default.elhelp + man
--no-loadup, -nl, --no-shared-memorydo not load loadup.el into bare Emacshelp + man
--no-site-fileDo not load the site-wide startup file.help + man
--no-x-resourcesDo not load X resources.help + man
--no-site-lisp, -nslDo not add site-lisp directories to load-path.help + man
--no-splashDo not display a splash screen during start-up.help + man
--no-window-system, -nwdo not communicate with X, ignoring $DISPLAYhelp + man
--init-directory DIRStart emacs with user-emacs-directory set to directory.help + man
--quick, -QSimilar to "-q --no-site-file --no-splash".help + man
--script FILERun file as an Emacs Lisp script.help + man
-xto be used in #!/usr/bin/emacs -x and has approximately the same meaning as -Q --scripthelp
--terminal, -t DEVICEUse specified file as the terminal instead of using stdin/stdout.help + man
--user, -u USERLoad user's init file instead of your own.help + man
--directory, -L DIRAdd dir to the list of directories Emacs searches for Lisp files.help + man
--eval EXPRevaluate Emacs Lisp expression EXPRhelp + man
--execute EXPRevaluate Emacs Lisp expression EXPRhelp
--file FILEThe same as specifying file directly as an argument.help + man
--find-file FILEvisit FILEhelp
--funcall, -f FUNCcall Emacs Lisp function FUNC with no argumentshelp + man
--insert FILEInsert contents of file into the current buffer.help + man
--killexit without asking for confirmationhelp + man
--load, -l FILEload Emacs Lisp FILE using the load functionhelp + man
--visit FILEvisit FILEhelp
--background-color, -bg COLOROn color displays, set the color of the window's background.help + man
--basic-display, -DThis option disables many display features;help + man
--border-color, -bd COLOROn color displays, set the color of the window's border.help + man
--border-width, -bw WIDTHSet the Emacs window's border width to the number of pixels specified by pixels.help + man
--color, --color MODEoverride color mode for character terminals;help + man
--cursor-color, -cr COLOROn color displays, set the color of the window's text cursor.help + man
--font, -fn FONTSet the Emacs window's font to that specified by font.help + man
--foreground-color, -fg COLOROn color displays, set the color of the text.help + man
--fullheight, -fhMake the first frame as high as the screen.help + man
--fullscreen, -fsMake the first frame fullscreen.help + man
--fullwidth, -fwMake the first frame as wide as the screen.help + man
--maximized, -mmMaximize the first frame, like "-fw -fh".help + man
--geometry, -g GEOMETRYSet the Emacs window's width, height, and position as specified.help + man
--no-bitmap-icon, -nbiDo not use picture of gnu for Emacs icon.help + man
--iconicStart Emacs in iconified state.help + man
--internal-border, -ib WIDTHSet the window's internal border width to the number of pixels specified by pixels.help + man
--line-spacing, -lsp PIXELSAdditional space to put between lines.help + man
--mouse-color, -ms COLOROn color displays, set the color of the window's mouse cursor.help + man
--name NAMESpecify the name which should be assigned to the initial Emacs window.help + man
--no-blinking-cursor, -nbcDisable blinking cursor.help + man
--reverse-video, -r, -rvDisplay the Emacs window in reverse video.help + man
--title, -T TITLESpecify the title for the initial X window.help + man
--vertical-scroll-bars, -vbenable vertical scroll barshelp + man
--xrm XRESOURCESSet additional X resources.help + man
--parent-id XIDSet parent window.help + man
--helpdisplay this help and exithelp + man
--versionDisplay Emacs version information and exit.help + man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.