How to show 'similar' commands when you forget the exact command [duplicate]












3















This question already has an answer here:




  • Any way to list similar commands?

    2 answers




If I get this:



No command 'pdf' found, but there are 16 similar ones
pdf: command not found


How do I see the 16 similar commands?










share|improve this question













marked as duplicate by Terrance, Eric Carvalho, karel, muru bash
Users with the  bash badge can single-handedly close bash questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Dec 7 at 4:26


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • This has been asked before (although perhaps not directly answered): Any way to list similar commands?
    – steeldriver
    Dec 6 at 19:50
















3















This question already has an answer here:




  • Any way to list similar commands?

    2 answers




If I get this:



No command 'pdf' found, but there are 16 similar ones
pdf: command not found


How do I see the 16 similar commands?










share|improve this question













marked as duplicate by Terrance, Eric Carvalho, karel, muru bash
Users with the  bash badge can single-handedly close bash questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Dec 7 at 4:26


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • This has been asked before (although perhaps not directly answered): Any way to list similar commands?
    – steeldriver
    Dec 6 at 19:50














3












3








3








This question already has an answer here:




  • Any way to list similar commands?

    2 answers




If I get this:



No command 'pdf' found, but there are 16 similar ones
pdf: command not found


How do I see the 16 similar commands?










share|improve this question














This question already has an answer here:




  • Any way to list similar commands?

    2 answers




If I get this:



No command 'pdf' found, but there are 16 similar ones
pdf: command not found


How do I see the 16 similar commands?





This question already has an answer here:




  • Any way to list similar commands?

    2 answers








bash gnome-terminal






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 6 at 19:00









Neil

1161




1161




marked as duplicate by Terrance, Eric Carvalho, karel, muru bash
Users with the  bash badge can single-handedly close bash questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Dec 7 at 4:26


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by Terrance, Eric Carvalho, karel, muru bash
Users with the  bash badge can single-handedly close bash questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Dec 7 at 4:26


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • This has been asked before (although perhaps not directly answered): Any way to list similar commands?
    – steeldriver
    Dec 6 at 19:50


















  • This has been asked before (although perhaps not directly answered): Any way to list similar commands?
    – steeldriver
    Dec 6 at 19:50
















This has been asked before (although perhaps not directly answered): Any way to list similar commands?
– steeldriver
Dec 6 at 19:50




This has been asked before (although perhaps not directly answered): Any way to list similar commands?
– steeldriver
Dec 6 at 19:50










4 Answers
4






active

oldest

votes


















2














If you know part of the command's name you could try apropos, e.g., in your case



apropos pdf





share|improve this answer































    1














    You can use ctrl+r and start typing your command. If used it earlier it will show you. A good trick to save a lot time.






    share|improve this answer































      0














      As hinted at in this previous answer Any way to list similar commands? the way to get at them seems to be to execute the spelling_suggestions method from the CommandNotFound python module directly, and then call print_spelling_suggestions with a suitably large value of its max_alt parameter in place of the default value 15:



      $ python3 -c '
      import sys
      from CommandNotFound import CommandNotFound
      cmd = sys.argv[1]
      cnf = CommandNotFound.CommandNotFound()
      cnf.print_spelling_suggestions(cmd,cnf.spelling_suggestions(cmd),,100)
      ' pdf

      Command 'pdf' not found, did you mean:

      command 'sdf' from deb sdf
      command 'puf' from deb puf
      command 'pydf' from deb pydf
      command 'pdv' from deb alliance
      command 'psf' from deb tcm
      command 'pdl' from deb pdl
      command 'xpdf' from deb xpdf
      command 'wdf' from deb wit
      command 'kdf' from deb kdf
      command 'df' from deb coreutils
      command 'pdd' from deb pdd
      command 'pda' from deb speech-tools
      command 'qpdf' from deb qpdf
      command 'p0f' from deb p0f
      command 'paf' from deb libpod-abstract-perl
      command 'pd' from deb puredata-core
      command 'pdb' from deb python

      Try: sudo apt install <deb name>





      share|improve this answer





























        0














        If you only want the recommended cmd in your terminal,



        I recommend this application:
        https://github.com/nvbn/thefuck



        You can install it by pip3:



        sudo apt update
        sudo apt install python3-dev python3-pip python3-setuptools
        sudo pip3 install thefuck


        And config it as you like in files like .bashrc for your shell:



        eval $(thefuck --alias)
        # You can use whatever you want as an alias, like for Mondays:
        eval $(thefuck --alias FUCK)




        Besides, commands combo like history | grep pdf can also work if you have executed the right command before.






        share|improve this answer




























          4 Answers
          4






          active

          oldest

          votes








          4 Answers
          4






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          If you know part of the command's name you could try apropos, e.g., in your case



          apropos pdf





          share|improve this answer




























            2














            If you know part of the command's name you could try apropos, e.g., in your case



            apropos pdf





            share|improve this answer


























              2












              2








              2






              If you know part of the command's name you could try apropos, e.g., in your case



              apropos pdf





              share|improve this answer














              If you know part of the command's name you could try apropos, e.g., in your case



              apropos pdf






              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Dec 7 at 5:15









              pomsky

              28.2k1185112




              28.2k1185112










              answered Dec 6 at 22:11









              Richard Quint

              170211




              170211

























                  1














                  You can use ctrl+r and start typing your command. If used it earlier it will show you. A good trick to save a lot time.






                  share|improve this answer




























                    1














                    You can use ctrl+r and start typing your command. If used it earlier it will show you. A good trick to save a lot time.






                    share|improve this answer


























                      1












                      1








                      1






                      You can use ctrl+r and start typing your command. If used it earlier it will show you. A good trick to save a lot time.






                      share|improve this answer














                      You can use ctrl+r and start typing your command. If used it earlier it will show you. A good trick to save a lot time.







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Dec 7 at 5:16









                      pomsky

                      28.2k1185112




                      28.2k1185112










                      answered Dec 6 at 21:59









                      Sakib Farhad

                      111




                      111























                          0














                          As hinted at in this previous answer Any way to list similar commands? the way to get at them seems to be to execute the spelling_suggestions method from the CommandNotFound python module directly, and then call print_spelling_suggestions with a suitably large value of its max_alt parameter in place of the default value 15:



                          $ python3 -c '
                          import sys
                          from CommandNotFound import CommandNotFound
                          cmd = sys.argv[1]
                          cnf = CommandNotFound.CommandNotFound()
                          cnf.print_spelling_suggestions(cmd,cnf.spelling_suggestions(cmd),,100)
                          ' pdf

                          Command 'pdf' not found, did you mean:

                          command 'sdf' from deb sdf
                          command 'puf' from deb puf
                          command 'pydf' from deb pydf
                          command 'pdv' from deb alliance
                          command 'psf' from deb tcm
                          command 'pdl' from deb pdl
                          command 'xpdf' from deb xpdf
                          command 'wdf' from deb wit
                          command 'kdf' from deb kdf
                          command 'df' from deb coreutils
                          command 'pdd' from deb pdd
                          command 'pda' from deb speech-tools
                          command 'qpdf' from deb qpdf
                          command 'p0f' from deb p0f
                          command 'paf' from deb libpod-abstract-perl
                          command 'pd' from deb puredata-core
                          command 'pdb' from deb python

                          Try: sudo apt install <deb name>





                          share|improve this answer


























                            0














                            As hinted at in this previous answer Any way to list similar commands? the way to get at them seems to be to execute the spelling_suggestions method from the CommandNotFound python module directly, and then call print_spelling_suggestions with a suitably large value of its max_alt parameter in place of the default value 15:



                            $ python3 -c '
                            import sys
                            from CommandNotFound import CommandNotFound
                            cmd = sys.argv[1]
                            cnf = CommandNotFound.CommandNotFound()
                            cnf.print_spelling_suggestions(cmd,cnf.spelling_suggestions(cmd),,100)
                            ' pdf

                            Command 'pdf' not found, did you mean:

                            command 'sdf' from deb sdf
                            command 'puf' from deb puf
                            command 'pydf' from deb pydf
                            command 'pdv' from deb alliance
                            command 'psf' from deb tcm
                            command 'pdl' from deb pdl
                            command 'xpdf' from deb xpdf
                            command 'wdf' from deb wit
                            command 'kdf' from deb kdf
                            command 'df' from deb coreutils
                            command 'pdd' from deb pdd
                            command 'pda' from deb speech-tools
                            command 'qpdf' from deb qpdf
                            command 'p0f' from deb p0f
                            command 'paf' from deb libpod-abstract-perl
                            command 'pd' from deb puredata-core
                            command 'pdb' from deb python

                            Try: sudo apt install <deb name>





                            share|improve this answer
























                              0












                              0








                              0






                              As hinted at in this previous answer Any way to list similar commands? the way to get at them seems to be to execute the spelling_suggestions method from the CommandNotFound python module directly, and then call print_spelling_suggestions with a suitably large value of its max_alt parameter in place of the default value 15:



                              $ python3 -c '
                              import sys
                              from CommandNotFound import CommandNotFound
                              cmd = sys.argv[1]
                              cnf = CommandNotFound.CommandNotFound()
                              cnf.print_spelling_suggestions(cmd,cnf.spelling_suggestions(cmd),,100)
                              ' pdf

                              Command 'pdf' not found, did you mean:

                              command 'sdf' from deb sdf
                              command 'puf' from deb puf
                              command 'pydf' from deb pydf
                              command 'pdv' from deb alliance
                              command 'psf' from deb tcm
                              command 'pdl' from deb pdl
                              command 'xpdf' from deb xpdf
                              command 'wdf' from deb wit
                              command 'kdf' from deb kdf
                              command 'df' from deb coreutils
                              command 'pdd' from deb pdd
                              command 'pda' from deb speech-tools
                              command 'qpdf' from deb qpdf
                              command 'p0f' from deb p0f
                              command 'paf' from deb libpod-abstract-perl
                              command 'pd' from deb puredata-core
                              command 'pdb' from deb python

                              Try: sudo apt install <deb name>





                              share|improve this answer












                              As hinted at in this previous answer Any way to list similar commands? the way to get at them seems to be to execute the spelling_suggestions method from the CommandNotFound python module directly, and then call print_spelling_suggestions with a suitably large value of its max_alt parameter in place of the default value 15:



                              $ python3 -c '
                              import sys
                              from CommandNotFound import CommandNotFound
                              cmd = sys.argv[1]
                              cnf = CommandNotFound.CommandNotFound()
                              cnf.print_spelling_suggestions(cmd,cnf.spelling_suggestions(cmd),,100)
                              ' pdf

                              Command 'pdf' not found, did you mean:

                              command 'sdf' from deb sdf
                              command 'puf' from deb puf
                              command 'pydf' from deb pydf
                              command 'pdv' from deb alliance
                              command 'psf' from deb tcm
                              command 'pdl' from deb pdl
                              command 'xpdf' from deb xpdf
                              command 'wdf' from deb wit
                              command 'kdf' from deb kdf
                              command 'df' from deb coreutils
                              command 'pdd' from deb pdd
                              command 'pda' from deb speech-tools
                              command 'qpdf' from deb qpdf
                              command 'p0f' from deb p0f
                              command 'paf' from deb libpod-abstract-perl
                              command 'pd' from deb puredata-core
                              command 'pdb' from deb python

                              Try: sudo apt install <deb name>






                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Dec 7 at 2:34









                              steeldriver

                              65.4k11104176




                              65.4k11104176























                                  0














                                  If you only want the recommended cmd in your terminal,



                                  I recommend this application:
                                  https://github.com/nvbn/thefuck



                                  You can install it by pip3:



                                  sudo apt update
                                  sudo apt install python3-dev python3-pip python3-setuptools
                                  sudo pip3 install thefuck


                                  And config it as you like in files like .bashrc for your shell:



                                  eval $(thefuck --alias)
                                  # You can use whatever you want as an alias, like for Mondays:
                                  eval $(thefuck --alias FUCK)




                                  Besides, commands combo like history | grep pdf can also work if you have executed the right command before.






                                  share|improve this answer


























                                    0














                                    If you only want the recommended cmd in your terminal,



                                    I recommend this application:
                                    https://github.com/nvbn/thefuck



                                    You can install it by pip3:



                                    sudo apt update
                                    sudo apt install python3-dev python3-pip python3-setuptools
                                    sudo pip3 install thefuck


                                    And config it as you like in files like .bashrc for your shell:



                                    eval $(thefuck --alias)
                                    # You can use whatever you want as an alias, like for Mondays:
                                    eval $(thefuck --alias FUCK)




                                    Besides, commands combo like history | grep pdf can also work if you have executed the right command before.






                                    share|improve this answer
























                                      0












                                      0








                                      0






                                      If you only want the recommended cmd in your terminal,



                                      I recommend this application:
                                      https://github.com/nvbn/thefuck



                                      You can install it by pip3:



                                      sudo apt update
                                      sudo apt install python3-dev python3-pip python3-setuptools
                                      sudo pip3 install thefuck


                                      And config it as you like in files like .bashrc for your shell:



                                      eval $(thefuck --alias)
                                      # You can use whatever you want as an alias, like for Mondays:
                                      eval $(thefuck --alias FUCK)




                                      Besides, commands combo like history | grep pdf can also work if you have executed the right command before.






                                      share|improve this answer












                                      If you only want the recommended cmd in your terminal,



                                      I recommend this application:
                                      https://github.com/nvbn/thefuck



                                      You can install it by pip3:



                                      sudo apt update
                                      sudo apt install python3-dev python3-pip python3-setuptools
                                      sudo pip3 install thefuck


                                      And config it as you like in files like .bashrc for your shell:



                                      eval $(thefuck --alias)
                                      # You can use whatever you want as an alias, like for Mondays:
                                      eval $(thefuck --alias FUCK)




                                      Besides, commands combo like history | grep pdf can also work if you have executed the right command before.







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Dec 7 at 3:45









                                      Denny

                                      11




                                      11















                                          Popular posts from this blog

                                          Ellipse (mathématiques)

                                          Quarter-circle Tiles

                                          Mont Emei