There are 8 cardinal directions in NetHack. You can use either the number keys or the vi-keys:
Whichever you set, you can always use the arrow keys, if using a port that allows for the arrow keys to work properly (most graphical ports do, but many terminal-based ports don't). However, relying solely on the arrow keys to move (sometimes called "grid bug conduct") is a very Bad Idea, because this makes overall diagonal movement cost more turns (requiring more food and letting more monsters spawn), and players tend to forget that the game lets them move diagonally, which makes it hard or impossible to retreat from a pursuing monster.
Whenever you are prompted for a direction, you can also use the following:
If the number_pad option is turned on, the vi-style movement keys are replaced by the following command aliases:
|h||? (help menu)|
|k||ctrl + d (kick)|