1

Normally, when i was using up button to get last commads on shell, my RPi was giving me the commands without showing repeated ones. Let say i command: ifconfig ifconfig ps aux ps aux ifconfig ifconfig When i was using Up button to saw last commands: ifconfig ps aux ifconfig

But now it makes: ifconfig ifconfig ps aux ps aux ifconfig ifconfig

How can i fix it?

1 Answer 1

1

You need to set or change the HISTCONTROL variable for your profile to include ignoredups or erasedups as you see fit. Short extracts from the bash documentation explains it better...

A value of ignoredups causes lines matching the previous history entry to not be saved


A value of erasedups causes all previous lines matching the current line to be removed from the history list before that line is saved

See the full bash man pages and https://askubuntu.com/a/15929 for more details

1
  • These options (which I recommend) only affect typed commands - not recalling history
    – Milliways
    Apr 17, 2019 at 8:38

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.