0

I need to use this "bind" command described in articles like:

https://www.computerhope.com/unix/bash/bind.htm

https://www.gnu.org/software/bash/manual/html_node/Bash-Builtins.html#Bash-Builtins

But when I tried to run this command in my zsh terminal in my Linux Mint 20.3 Una(its base is Ubuntu 20.04 focal):

bind -P

I got "zsh: command not found: bind"

then I tried to install it: sudo apt-get install bind

I got: "Package bind is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: bind9:i386 bind9"

but this bind9 is for DNS server, not what I want.

Why can I not install this? Where is this command???

1 Answer 1

3

This command is part of bash, not zsh.

Those 2 links even tell you it is part of bash.

If you have bash installed, then look at the manual - man bashbuiltins. If not, then install it anyway. Oh! and run bash then try the bind command.

And kudos to @YisroelTech for pointing out zsh's equivelent - bindkey.

4
  • Okay. so how can I install this bind in my zsh? I could not find it...
    – Russo
    May 18, 2023 at 10:46
  • You don't, you run bash instead.
    – Bib
    May 18, 2023 at 10:46
  • Okay. So I need to put my bash commands inside a file after "#!/usr/bin/env bash", then run it. thanks
    – Russo
    May 18, 2023 at 10:57
  • 2
    Or use Zsh's bindkey in the config file (see jdhao.github.io/2019/06/13/zsh_bind_keys) May 18, 2023 at 11:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .