The #version extended command displays information about your version of NetHack. For a short one-line version information, you can press v.
Along with the version number, useful information about the set compile-time options and available windowing systems are shown. Certain things can be compiled in or out of the game; #version will show a list of all options compiled in. Whether you can't remember if you are allowed to play the Tourist role or if the Keystone Kops may appear when shoplifting, the information appears here. Within the options compiled in is a range of versions that save and bones files from the current version will be compatible with.
Supported windowing systems are shown. #version, for example, informs if the tty and graphical tiled systems are available.
Depending on your settings, using the version command might display something like the following:
NetHack version 3.4.3
Options compiled into this edition: autopickup_exceptions, color, data librarian, debug mode, Elbereth, experience points on status line, insurance files for recovering from crashes, Keystone Kops, exclusive lock on level 0 file, log file, news file, redo command, rogue level, saddles and riding, screen clipping, seduction, sinks, tourists, user sounds via pmatch, walled mazes, zero-compressed save files, save and bones files accepted from versions 3.4.0 through 3.4.3, basic NetHack features.
Supported windowing systems: mswin, with a default of mswin.