NETHACK(6)
okay bestie, welcome to the NETHACK(6) page from the Games Manual โ we're talking nethack, aka Exploring The Mazes of Menace. buckle up, this one's iconic. ๐
๐ธ NAME ๐ธ
nethack โ Exploring The Mazes of Menace โจ
๐ SYNOPSIS ๐
the whole invocation situation is literally:
nethack [ -d|--directory directory ] [ -w|--windowtype interface ]
[ --nethackrc:RC-file | --no-nethackrc ] [ -n ] [ -dec | -ibm ]
[ -u playername ] [ -X | -D ] [ -p profession ] [ -r race ] [ -@ ]
Also [ -A|-Arc | -B|-Bar | -C|-Cav | -H|-Hea | -K|-Kni | -M|-Mon |
-P|-Pri | -R|-Rog | -Ran | -S|-Sam | -T|-Tou | -V|-Val | -W|-Wiz ]
nethack [ -d|--directory directory ] -s|--scores [ -v ]
[ -p profession ] [ -r race ] [ playernames ]
nethack [ --usage | --help ] [ --showpaths ]
[ --version[:copy|:dump|:show] ]
๐ DESCRIPTION ๐
okay so NetHack is a display oriented Dungeons & Dragons(tm) - like game. no cap, the standard tty display and command structure resemble rogue. ๐
other, more graphical display options exist for most platforms. graphics girlies stay winning โจ
to get started you really only need to know two commands, bestie: the command ? will give you a list of the available commands (as well as other information), and the command / will identify the things you see on the screen. that's it. that's the starter pack. ๐ซถ
to win the game (as opposed to merely playing to beat other people's high scores) you must locate the Amulet of Yendor which is somewhere below the 20th level of the dungeon and get it out. few people achieve this; most never do. those who have done so go down in history as heroes among heroes โ and then they find ways of making the game even harder. ๐ญ see the Guidebook section on Conduct if this game has gotten too easy for you. ๐
when the game ends, whether by your dying, quitting, or escaping from the caves, NetHack will give you (a fragment of) the list of top scorers. the scoring is based on many aspects of your behavior, but a rough estimate is obtained by taking the amount of gold you've found in the cave plus four times your (real) experience. precious stones may be worth a lot of gold when brought to the exit. there is a 10% penalty for getting yourself killed. ๐
the environment variable NETHACKOPTIONS can be used to initialize many run-time options. the ? command provides a description of these options and syntax. (the -dec and -ibm command line options are mutually exclusive and are equivalent to the decgraphics and ibmgraphics run-time options described there, and are provided purely for convenience on systems supporting multiple types of terminals.) ๐
because the option list can be very long, options may also be included in a configuration file. the default is located in your home directory and named .nethackrc on UNIX systems (including descendants such as linux, NetBSD, and macOS). on Windows, the name is also .nethackrc but the location can vary (see --showpaths below). on other systems, the default may be different, possibly NetHack.cnf. on MS-DOS, the name is defaults.nh in NetHack's directory (folder), while on VMS|OpenVMS it is nethack.ini in your home directory. the default configuration file may be overridden via the --nethackrc:rc-file command line option or by setting NETHACKOPTIONS in your environment to a string consisting of an @ character followed by the path and filename. ๐
the -u playername option supplies the answer to the question "Who are you?". it overrides any name from the options or configuration file, USER, LOGNAME, or getlogin(), which will otherwise be tried in order. if none of these provides a useful name, the player will be asked for one. player names (in conjunction with uids) are used to identify save files, so you can have several saved games under different names. conversely, you must use the appropriate player name to restore a saved game. no cap. ๐พ
a playername suffix can be used to specify the profession, race, alignment and/or gender of the character. the full syntax of the playername that includes a suffix is "name-ppp-rrr-aaa-ggg". "ppp" are at least the first three letters of the profession (this can also be specified using a separate -p profession option). "rrr" are at least the first three letters of the character's race (this can also be specified using a separate -r race option). "aaa" are at least the first three letters of the character's alignment, and "ggg" are at least the first three letters of the character's gender. any of the parts of the suffix may be left out. โจ
-p profession can be used to determine the character profession, also known as the role. you can specify either the male or female name for the character role, or the first three characters of the role as an abbreviation. likewise, -r race can be used to explicitly request that a race be chosen. ๐ญ
the -A|-Arc | -B|-Bar | -C|-Cav | -H|-Hea | -K|-Kni | -M|-Mon | -P|-Pri | -R|-Rog | -Ran | -S|-Sam | -T|-Tou | -V|-Val | -W|-Wiz options for role selection are maintained for compatibility with older versions of the program. they are mutually exclusive and the single-letter form must be uppercase. Ranger has no single-letter choice because -R is already used for the Rogue role. ๐น
-@ tells nethack to choose any omitted characteristics (profession/role, race, gender, alignment) randomly without prompting. otherwise, leaving out any of these characteristics will result in you being prompted during game startup for the information. ๐ฒ
the -n option suppresses printing of any news from the game administrator. ๐ฐ
the -X option will start the game in a special non-scoring discovery mode (also known as explore mode). -D will start the game in debug mode (also known as wizard mode) after changing the character name to โwizardโ, if the player is allowed. otherwise it will switch to -X. control of who is allowed to use debug mode is done via the โWIZARDS=โ line in nethack's sysconf file. ๐ฎ
the -d or --directory option, which must be the first argument if it appears, supplies a directory which is to serve as the playground. it overrides the value from NETHACKDIR, HACKDIR, or the directory specified by the game administrator during compilation (usually /usr/games/lib/nethackdir). this option is usually only useful to the game administrator. the playground must contain several auxiliary files such as help files, the list of top scorers, and a subdirectory save where games are saved. ๐๏ธ
the -w or --windowtype interface option can be used to specify which interface to use if the program has been built with support for more than one. specifying a value on the command line overrides any value specified in the run-time configuration file. NetHack's #version command shows available interfaces. ๐ช
the --nethackrc:RC-file option will use RC-file instead of the default run-time configuration file (typically ~/.nethackrc) and the --no-nethackrc option can be used to skip any run-time configuration file. ๐งพ
some options provide feedback and then exit rather than play the game:
- the
-sor--scoresoption alone will print out the list of your scores on the current version. an immediately following-vreports on all versions present in the score file.โ-s|-s -vโmay also be followed by arguments-p professionand-r raceto print the scores of particular roles and races only. either can be specified multiple times to include more than one role or more than one race. when both are specified, score entries which match either the role or the race (or both) are printed rather than just entries which match both.โ-s|-s -vโmay be followed by one or more player names to print the scores of the players mentioned, by'all'to print out all scores, or by a number to print that many top scores. combining names with role or race or both will report entries which match any of those rather than just the ones which match all. ๐ --versionor--version:showcan be used to cause NetHack to show the version number, the date and time that the program was built from its source code, and possibly some auxiliary information about that source code, then exit. the optional auxiliary information is git commit hash (reflecting the source code's most recent modification when extracted from the git version control system, if that is in use) if available when the program was built. on some platforms such as Windows and macOS, a variation,--version:copy, can be used to cause NetHack to show the version information, then exit, while also leaving a copy of that information in the paste buffer or clipboard for potential insertion into things like bug reports. on any platform,--version:dumpcan be used to show most of the data used when checking whether a save file or bones file is compatible with the program. the program will display a line containing five numbers expressed in hexadecimal, then exit. ๐งฌ--showpathscan be used to cause NetHack to show where it is expecting to find various files. among other things it shows the path to and name for the player's run-time configuration file, a text file which can be edited to customize aspects of how the game operates. ๐บ๏ธ--usageor--helpwill display information similar to this manual page, then exit. useโnethack --usage | moreโto read it a page at a time. ๐
๐ AUTHORS ๐
Jay Fenlason (+ Kenny Woodland, Mike Thome and Jon Payne) wrote the original hack, very much like rogue (but full of bugs). ๐
Andries Brouwer continuously deformed their sources into an entirely different game. ๐
Mike Stephenson has continued the perversion of sources, adding various warped character classes and sadistic traps with the help of many strange people who reside in that place between the worlds, the Usenet Zone. a number of these miscreants are immortalized in the historical roll of dishonor and various other places. ๐
the resulting mess is now called NetHack, to denote its development by the Usenet. Andries Brouwer has made this request for the distinction, as he may eventually release a new version of his own. โจ
๐ FILES ๐
okay so the run-time configuration options? already covered above, bestie. They use a platform-specific name for a file in a platform-specific location. For Unix, the name is .nethackrc in the user's home directory. ๐
All other files are in the playground directory, normally /usr/games/lib/nethackdir. If DLB was defined during the compile, the data files and special levels will be inside a larger file, normally nhdat, instead of being separate files. slay.
Here's the full file lineup, no skips:
nethackโ The program itself. the main character, literally.Guidebook|Guidebook.txtโ NetHack's user manual. ๐data,oracles,rumorsโ Data files used by NetHack.bogusmonโ Another data file.engrave,epitaph,tributeโ Still more data files.symbolsโ Data file holding sets of specifications for how to display monsters, objects, and map features.optionsโ Data file containing a description of the build-time option settings.help,hh,cmdhelpโ Help data files. (cmdhelpis obsolete.)opthelp,optmenu,wizhelpโ More help data files.keyhelp,usagehlpโ Even more help data files.*.luaโ Predefined special levels, dungeon control for special levels, quest texts.historyโ A short history of NetHack.licenseโ Rules governing redistribution.recordโ The list of top scorers. ๐logfileโ An extended list of games played (optional).xlogfileโ A more detailed version oflogfile(also optional).paniclogโ Record of exceptional conditions discovered during program execution.xlock.nnโ Description of dungeon level nn of active game x if there's a limit on the number of simultaneously active games.UUcccccc.nnโ Alternate form for dungeon level nn of active game by user UU playing character named cccccc when there's no limit on number of active games.permโ Lock file forxlock.0orUUcccccc.0.bonD0.nnโ Descriptions of the ghost and belongings of a deceased adventurer who met his or her demise on level nn. A subsequent character might encounter this old level. ghosting, but make it lore. ๐save/โ A subdirectory containing saved games.sysconfโ System-wide options. Required if program is built withSYSCFoption enabled, ignored if not.
The location of sysconf is specified at build time and can't be changed except by updating source file config.h and rebuilding the program. no cap, that's a compile-time lock-in.
NetHack's Guidebook might not be present if whoever packaged or installed the program distribution neglected to include it. tragic, honestly.
In a perfect world, paniclog would remain empty. ๐
โจ
๐ ENVIRONMENT ๐
these env vars are the backstage pass, bestie:
USERorLOGNAMEโ Your login name.HOMEโ Your home directory.SHELLโ Your shell.TERMโ The type of your terminal.HACKPAGERorPAGERโ Replacement for default pager.MAILโ Mailbox file.MAILREADERโ Replacement for default reader (probably/bin/mailor/usr/ucb/mail).NETHACKDIRorHACKDIRโ Playground.NETHACKOPTIONSโ String predefining several NetHack options.
If the same option is specified in both NETHACKOPTIONS and .nethackrc, the value assigned in NETHACKOPTIONS takes precedence. periodt, NETHACKOPTIONS wins that fight.
SHOPTYPE and SPLEVTYPE can be used in debugging (wizard) mode. DEBUGFILES can be used if the program was built with DEBUG enabled. iykyk.
๐ฆ SEE ALSO ๐ฆ
recover(6)โ that's the whole see-also squad. noted. ๐ซถ
๐ BUGS ๐
Probably infinite. ๐ญ๐
๐ COPYRIGHT ๐
This file is Copyright (C) Robert Patrick Rankin, 2024 for version NetHack-5:1.31. NetHack may be freely redistributed. See license for details.
Dungeons & Dragons is a Trademark of Wizards of the Coast, Inc.
xoxo, bestie โ this was NETHACK(6), dated 26 April 2026, version NetHack-5:1.31. stay iconic ๐ซถโจ๐
๐ฆ where this page comes from
- arch rolling: nethack 5.0.0-2 ยท NGPL
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms