0

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.

enter image description here

1 Answers1

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 shell

  • type exec bash to replace the current sh shell with bash

  • type 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