Commands

From NetHackWiki
Revision as of 14:01, 11 March 2022 by Sloth1089 (talk | contribs) (Moved reference card line under new heading, renamed cmd table header "Command" as "Extended Command")
Jump to navigation Jump to search
This article is about commands. For a chart of keyboard keys and their uses, see Commands (by key).

In NetHack, a command is an action you want the game to perform. This includes actions your character might do, gathering information about your character or the game, or even modifying the behavior of the game itself.

In previous versions of NetHack, commands were separated into two main categories: normal commands, which predominantly were by default bound to single character keys, and extended commands, which were somewhat less common and either didn't have a default keybinding or were executed with a modifier key like alt or ctrl. These "extended commands" are entered by typing # and entering the command name.

NetHack 3.6.1 does not make a meaningful distinction between normal commands and extended commands, providing most normal commands with an "extended" form, and can be entered either by their respective keybinding or the extended way. 3.6.1 also adds the custom keybinding system, where players can arbitrarily re-bind commands to particular keys or key combinations. When setting these, the "extended" format command name is used. For more information see the binding keys main article.

When entering commands with the # prefix, some commands will autocomplete after only a few letters. This behavior can be modified with the AUTOCOMPLETE option.

Directional keys

Keyboard
y k u
h l
b j n
Numpad
Numpad 7 Numpad 8 Numpad 9
Numpad 4 Numpad 6
Numpad 1 Numpad 2 Numpad 3

()Available ony if number_pad option is enabled.

Commands

Here is a list of commands, their default keybinding, and a short description.

Meta Key

System Key
NT, OS/2, PC and ST Alt
Amiga Set altmeta option

Controls

Category Action Extended Command Key Short Description
Cancel ESC
Redo last command Ctrl + a
Panic button Ctrl + c Quit the game.
Shell Commands Save #save S Save the game and exit.
Quit #quit Meta + q Exit without saving current game.
Suspend #suspend Ctrl + z Suspend the game (UNIX(R) versions with job control only).
Message Repeat previous messages #prevmsg Ctrl + p Show previously displayed game messages.
Help on commands #whatdoes & Tell what a key does.
#? Meta + ?††† Get the list of available extended commands.
Help, in game Help (in-game) #help ? Show the help menu.
h
What is #whatis / Show what type of a thing a symbol corresponds to.
Far look #glance ; Show what a map symbol means.
#herecmdmenu Show a menu of possible actions in your current location.
#therecmdmenu Show menu of possible actions in an adjacent location.[1]
In game options Explore mode #exploremode Enter non-scoring game exploring/discovery mode. Used for learning about the game.
Autopickup #autopickup @ Toggle autopickup on/off.
Terrain #terrain Show the map without monsters, objects, or traps.
Motion Direction keys Go one step in the direction indicated
Uppercase Direction keys Go in that direction until you hit a wall
m + Direction keys Move without picking up objects or fighting
M + Direction keys Move far, no pickup
g + Direction keys Move until something interesting is found.
G + Direction keys Same as g + Direction keys, but forking of corridors is not considered interesting.
Ctrl + Direction keys
Staircase #up < Go up a staircase.
#down > Go down a staircase.
Travel #travel _ Travel to a specific location on the map.
m + _ m prefix shows a menu of interesting targets in sight without asking to move the cursor.
Teleport #teleport Ctrl + t Teleport around the level, if you have the ability.
Jump #jump Meta + j Jump to a location.
j
Other actions Wipe #wipe Meta + w Wipe off your face.
Sit #sit Meta + s Sit down.
Rest #wait . Rest one move while doing nothing.
Space if rest_on_space is on.
Battle Fight F + Direction keys Fight a monster (even if you only guess one is there).
Firing #fire f Fire ammunition from quiver.
Quiver #quiver Q Select ammunition for quiver.
Zap #zap z Zap a wand.
Spellcasting #cast Z Cast a spell.
Throw #throw t Throw something.
Explore Near look #look : Look at what is under you.
Search #search s Search for unseen things near you.
Engrave #engrave E Engrave writing on the floor.
Trap #seetrap ^ Show the type of an adjacent trap.
untrap #untrap Meta + u Untrap something.
u

In Game Status

Category Action Extended Command Key Short Description
Character info #attributes Ctrl + x Display basic information about your character.
Conduct #conduct Meta + C List which challenges you have adhered to.
Current equipment #seeall * Show all equipment in use.
Amulet #seeamulet " Show currently worn amulet.
Armor #seearmor [ Show currently worn armor.
Gold #seegold $ Count your gold.
Ring #seerings = Show currently worn ring(s).
Spellcasting #seespells + List and reorder known spells.
Tool #seetools ( Show tools currently in use.
Weapon #seeweapon ) Show currently wielded weapons.
Discoveries #known \ Show discovered objects.
#knownclass ` Show discovered objects of one type.
Dungeon Overview #overview Meta + O Display an overview of the dungeon.
Ctrl + o
Annotate #annotate Meta + A Leave a note about the level.
Ctrl + n

Equiptment, Skills & Inventory

Category Action Extended Command Key Short Description
Equipment Twoweapon #twoweapon X Toggle two-weapon combat.
Meta + 2††
Take off #takeoffall A Remove all armor.
Put on #puton P Put on an accessory.
Remove #remove R Remove an accessory (ring, amulet, or blindfold).
Take off #takeoff T Take off one piece of armor.
Wield #wield w Wield a weapon.
Wear #wear W Wear a piece of armor.
Swap weapons #swap x Swap wielded and secondary weapons.
Apply #apply a Apply (use) a tool. If used on a wand, that wand will be broken, releasing its magic in the process.
m + a m prefix skips items if the tool used acts on items on the floor
Quiver #quiver Q Select ammunition for quiver.
Skills Enhance #enhance Meta + e Advance or check weapons skills.
Inventory #inventory i Show your inventory.
#inventtype I List inventory by type.
I + * List all gems in inventory.
I + u List all unpaid items
I + x List all used up items that are on your shopping bill
I + B List all items known to be blessed
I + U List all items known to be uncursed
I + C List all items known to be cursed
I + X List all items whose bless/curse status is unknown
I + $ Count your money.
Call #call C Name a monster or object, or add an annotation.
Name #name Meta + n Name an item or type of object.
N
Adjust #adjust Meta + a Adjust inventory letters.

Character interaction

Category Action Extended Command Key Short Description
Chat #chat Meta + c Talk to someone, monster or creature.
Shop Pay bill #pay p Pay your shopping bill.
Creature Ride #ride Meta + R Ride (or stop riding) a monster.
Call #call C Name a monster or object, or add an annotation.
Name #name Meta + n Name an item or type of object.
N
Monster Ability #monster Meta + m Use a monster's special ability.
Turn undead away #turn Meta + t Turn undead.[2]
Gods Pray #pray Meta + p Pray to the gods for help.
Offer #offer Meta + o Offer a sacrifice to the gods.

Item interaction

Category Action Extended Command Key Short Description
Basics Pick up #pickup , Pick up things at current location.
m + , m prefix to force a selection menu
Drop #drop d Drop an item.
#droptype D Drop specific item types.
D + B Drop all objects known to be blessed.
D + U Drop all objects known to be uncursed.
D + C Drop all objects known to be cursed.
D + X Drop all objects of unknown B/U/C status.
D + a Drop all objects, without asking for confirmation.
D + i Examine your inventory before dropping anything.
D + u Drop only unpaid objects (when in a shop).
D + m Use a menu to pick which object(s) to drop.
D + % + u Drop only unpaid food.
Kick #kick Ctrl + d Kick something.
k
Read #read r Read a scroll, spellbook, or something else.
Eat #eat e Eat something.
m + e m prefix skips eating items on the floor.
Drink #quaff q Drink something.
Rub #rub Meta + r Rub a lamp or a stone.
Dip #dip Meta + d Dip an object into something.
Invoke #invoke Meta + i Invoke an object's powers.
Throw #throw t Throw something.
Containers,bag,box Tip #tip Meta + T Tip over a container.
Loot #loot Meta + l Loot a box on the floor.
l
Doors Open door #open o Open a door.
Close door #close c Close a door.
Lock Force lock #force Meta + f Force a lock.

System

Action Extended Command Key Short Description
History #history V Show long version and game history.
Version #versionshort v Show version string.
#version Meta + v List compile time options for this version of NetHack.
Redraw screen #redraw Ctrl + r Redraw the screen.
Ctrl + l
Shell escape #shell ! Do a shell escape. (Disabled on most NetHack servers.)
Options #options O Show and change settings.

() These keybindings are only present when the number_pad option is enabled.

(††) These keybindings are only present when the number_pad option is disabled.

(†††) Not supported on all platforms

Wizard-mode commands

Playing in wizard mode adds several commands:

Command Shortcut Short Description
levelchange Change your experience level.
lightsources Show mobile light sources.
monpolycontrol Control monster polymorphs.
panic Test the panic routine.
polyself Polymorph self.
seenv Show seen vectors.
stats Show memory statistics.
timeout Look at the timeout queue.
vanquished List vanguished monsters.
vision Show vision array.
wizdebug_bury Bury objects under and around you.
wizdebug_traveldisplay Toggle travel display.
wizdetect ctrl + e Search a room.
wizgenesis ctrl + g Create a monster.
wizidentify ctrl + i Identify all items in inventory.
wizintrinsic Set intrinsic.
wizlevelport ctrl + v Teleport to another level.
wizmap ctrl + f Map the level.
wizrumorcheck Verify rumor boundaries.
wizsmell Smell monster.
wizwhere Show locations of special levels.
wizwish ctrl + w Wish for something.
wmode Show wall modes.

SLASH'EM

SLASH'EM adds the following extended commands:

Command Short Description
2weapon Alias of 'Twoweapon'.
Borrow steals gold from monsters.
Technique use a technique.
Youpoly Polymorph at will, as a Doppelganger, Flame mage, or Ice mage.

Reference Cards

A number of downloadable reference card are also available for quick reference.

Notes

  1. This command currently does not function properly; see this commit.
  2. This command is related to the D&D concept of "undead turning"; it does not cause your character to suddenly become an undead monster!

This page may need to be updated for the current version of NetHack.

It may contain text specific to NetHack 3.6.1. Information on this page may be out of date.

Editors: After reviewing this page and making necessary edits, please change the {{nethack-361}} tag to the current version's tag or {{noversion}} as appropriate.