So when ever I use the up arrow it does not show the history of last command but does ^[[A and down ^[[B I don't know what is this called but also I have $ but running su did not have it.

Using Ubuntu Server 16.04.1


History is not present in all shells. You need to start a shell with history like bash. To do so, just type the name of the shell, like


or the full path of the executable, like


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


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 it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.