It appears that your login shell is /bin/sh. On Ubuntu, this is a shell intended for scripting, it doesn't have any comfortable command line edition feature such as history. To get a proper command line shell, change your login shell to bash or zsh:
chsh -s /bin/zsh
or
chsh -s /bin/bash
If that machine has restrictions which prevent you from changing your login shell, you can tell sh to execute bash or zsh when logging in. See how can I use bash as my login shell when my sysadmin refuses to let me change ithow can I use bash as my login shell when my sysadmin refuses to let me change it