Nethack keybord movement not working

In your nethack options file (its location depends on the system), you should set the number_pad option to 0 to use the keys hjklyubn for movement. The line to set this option is

OPTIONS=number_pad:0