How to show 'similar' commands when you forget the exact command [duplicate]
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?
bash gnome-terminal
marked as duplicate by Terrance, Eric Carvalho, karel, muru
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 '18 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.
add a comment |
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?
bash gnome-terminal
marked as duplicate by Terrance, Eric Carvalho, karel, muru
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 '18 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 '18 at 19:50
add a comment |
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?
bash gnome-terminal
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
bash gnome-terminal
asked Dec 6 '18 at 19:00
NeilNeil
1162
1162
marked as duplicate by Terrance, Eric Carvalho, karel, muru
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 '18 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
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 '18 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 '18 at 19:50
add a comment |
This has been asked before (although perhaps not directly answered): Any way to list similar commands?
– steeldriver
Dec 6 '18 at 19:50
This has been asked before (although perhaps not directly answered): Any way to list similar commands?
– steeldriver
Dec 6 '18 at 19:50
This has been asked before (although perhaps not directly answered): Any way to list similar commands?
– steeldriver
Dec 6 '18 at 19:50
add a comment |
4 Answers
4
active
oldest
votes
If you know part of the command's name you could try apropos
, e.g., in your case
apropos pdf
add a comment |
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.
add a comment |
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>
add a comment |
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.
add a comment |
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you know part of the command's name you could try apropos
, e.g., in your case
apropos pdf
add a comment |
If you know part of the command's name you could try apropos
, e.g., in your case
apropos pdf
add a comment |
If you know part of the command's name you could try apropos
, e.g., in your case
apropos pdf
If you know part of the command's name you could try apropos
, e.g., in your case
apropos pdf
edited Dec 7 '18 at 5:15
pomsky
29.1k1190116
29.1k1190116
answered Dec 6 '18 at 22:11
Richard QuintRichard Quint
175212
175212
add a comment |
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
edited Dec 7 '18 at 5:16
pomsky
29.1k1190116
29.1k1190116
answered Dec 6 '18 at 21:59
Sakib FarhadSakib Farhad
111
111
add a comment |
add a comment |
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>
add a comment |
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>
add a comment |
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>
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>
answered Dec 7 '18 at 2:34
steeldriversteeldriver
66.1k11105178
66.1k11105178
add a comment |
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered Dec 7 '18 at 3:45
DennyDenny
11
11
add a comment |
add a comment |
This has been asked before (although perhaps not directly answered): Any way to list similar commands?
– steeldriver
Dec 6 '18 at 19:50