Ask Your Question

Bash reverse-i-search not working for ssh commands

asked 2018-09-21 12:41:43 -0500

invyz gravatar image

I'm trying to find previous commands like I've done in the past on Ubuntu/Mint/CentOS that begin with 'ssh' but it doesn't appear any ssh command I type is being saved in order to do reverse-i-search to find it. This is annoying to type long URL's many times. Anyone else know of this issue?

edit retag flag offensive close merge delete


Careful .... you typed previous command as user or root ?

fedofix gravatar imagefedofix ( 2018-09-21 15:49:31 -0500 )edit

When running the history command, what does it show?

What shell are you using? (run echo $SHELL).

villykruse gravatar imagevillykruse ( 2018-09-23 08:12:07 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-09-25 12:58:26 -0500

masteroman gravatar image

If you type in command with space on the beginning it won't be saved in your HISTFILE. But I doubt you're doing that.

Having bash-completion package installed should provide you with ssh command completion with hosts from .ssh/known_hosts. Perhaps that can be good substitute.

Regarding shell history itself please specify which shell you're using as well as the terminal emulator and other relevant data (edit your question) and I'll try to reproduce the issue and update this answer.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-09-21 12:41:43 -0500

Seen: 74 times

Last updated: Sep 25 '18