Binding keyboard keypresses to certain non-printing-character functions, such as cursor keys, can be done in multiple ways. This is the *nix way of course, but it doesn’t help if you’re in a server shell, editing your command prompt, and Ctrl-back barfs characters instead of moving your cursor.

Usually FreeBSD uses csh as it’s default shell. The necessary bindings can be added in ~/.cshrc:

bindkey "^W" backward-delete-word
bindkey -k up history-search-backward
bindkey -k down history-search-forward
bindkey '\e[3~'         delete-char
bindkey '\e[1;5C'       forward-word
bindkey '\e[1;5D'       backward-word

Though most sources I find tell me that FreeBSD uses csh as it’s default shell, under some circumstances jails I create under TrueNAS Core use sh instead. To change to csh, use the chsh command. Having come from Linux I am accustomed to using nano to edit text files, whereas FreeBSD’s default editor is vi. It uses the default editor for some shell built-in functions (such as chsh), so I alter it by editing ~/.profile and changing the EDITOR shell variable to nano then logging out/back in.