I am a beginner with Ubuntu 22.04.2 Desktop. Some of the commands I used before do not work right now, and history is one of them. Previously, I used MobaXterm to only download and upload files. When I used my account on Ubuntu, this is the same message I got from both of them.
Asked
Active
Viewed 890 times
1 Answers
1
Based on your screenshot, you are using the sh
shell. On Ubuntu systems, /bin/sh
is dash, the Debian Almquist shell, which is a lightweight shell that does not provide shell history features.
To switch to Ubuntu's default interactive shell, bash, you can do any one of
type
bash
to open a new interactive shell within your sh shelltype
exec bash
to replace the current sh shell with bashtype
chsh -s /bin/bash
to set your default login shell to bash - you will be prompted to enter your password to confirm the change.
See also Arrow keys, Home, End, tab-complete keys not working in shell

steeldriver
- 136,215
- 21
- 243
- 336
-
thank you so much. The first one worked. but for chsh -s /bin/bash it says I cannot change it. so it seems I have to use bash command every time. – Fateme Nazari Mar 05 '23 at 18:04
sh
- history is a feature of more full-featured shells like bash, zsh etc. - see Arrow keys, Home, End, tab-complete keys not working in shell – steeldriver Mar 03 '23 at 22:12echo "$SHELL"
to see which shell you're using. Read theman
page for that shell. – waltinator Mar 03 '23 at 22:38