command-not-found - suggest installation of missing software packages in terminal

HowTo: install command-not-found
Contents
Introduction[edit]
Copy or share this direct link!
Click = Copy
Copied to clipboard!
https://www.kicksecure.com/wiki/Command-not-found?oldid=70109#Introduction
Click below ↴ = Copy to Clipboard
Click = Copy
Copied to clipboard!
[[Command-not-found#Introduction|Introduction]]
Copy as Wikitext
Click = Copy
Copied to clipboard!
[Introduction](https://www.kicksecure.com/wiki/Command-not-found?oldid=70109#Introduction)
for Discourse, reddit, GitHub
Click = Copy
Copied to clipboard!
[Introduction](https://www.kicksecure.com/wiki/Command-not-found?oldid=70109#Introduction)
Copy as Markdown
Click = Copy
Copied to clipboard!
[url=https://www.kicksecure.com/wiki/Command-not-found?oldid=70109#Introduction]Introduction[/url]
Copy as phpBB
Click below ↴ = Open social URL with share data
We don't use embedded scripts
This share button is completely self-hosted by this webserver. No scripts from any of the social networks are embedded on this webserver. See also
Social Share Button.
Quote Debian package command-not-found
:
Suggest installation of packages in interactive bash sessions This package will install a handler for command_not_found that looks up programs not currently installed but available from the repositories.
Installation[edit]
Copy or share this direct link!
Click = Copy
Copied to clipboard!
https://www.kicksecure.com/wiki/Command-not-found?oldid=70109#Installation
Click below ↴ = Copy to Clipboard
Click = Copy
Copied to clipboard!
[[Command-not-found#Installation|Installation]]
Copy as Wikitext
Click = Copy
Copied to clipboard!
[Installation](https://www.kicksecure.com/wiki/Command-not-found?oldid=70109#Installation)
for Discourse, reddit, GitHub
Click = Copy
Copied to clipboard!
[Installation](https://www.kicksecure.com/wiki/Command-not-found?oldid=70109#Installation)
Copy as Markdown
Click = Copy
Copied to clipboard!
[url=https://www.kicksecure.com/wiki/Command-not-found?oldid=70109#Installation]Installation[/url]
Copy as phpBB
Click below ↴ = Open social URL with share data
We don't use embedded scripts
This share button is completely self-hosted by this webserver. No scripts from any of the social networks are embedded on this webserver. See also
Social Share Button.
The order in which these commands are run matter, [1] but the process is idempotent. This means it is possible to re-apply all of the following steps.
1. Delete /etc/apt/apt.conf.d/30usability-misc
because it contains settings that speed up APT
but break
command-not-found
. [2]
Click = Copy Copied to clipboard! sudo rm -f /etc/apt/apt.conf.d/30usability-misc
2. Install command-not-found
.
Install package(s) command-not-found
following these instructions
1 Platform specific notice.
- Kicksecure: No special notice.
- Kicksecure-Qubes: In Template.
2 Update the package lists and upgrade the system.
Click = Copy Copied to clipboard! sudo apt update && sudo apt full-upgrade
3 Install the command-not-found
package(s).
Using apt
command line --no-install-recommends
option is in most cases optional.
Click = Copy Copied to clipboard! sudo apt install --no-install-recommends command-not-found
4 Platform specific notice.
- Kicksecure: No special notice.
- Kicksecure-Qubes: Shut down Template and restart App Qubes based on it as per Qubes Template Modification
.
5 Done.
The procedure of installing package(s) command-not-found
is complete.
3. Run update-command-not-found
with root rights.
Click = Copy Copied to clipboard! sudo update-command-not-found
4. Done.
Setup of update-command-not-found
has been completed.
Issues[edit]
Copy or share this direct link!
Click = Copy
Copied to clipboard!
https://www.kicksecure.com/wiki/Command-not-found?oldid=70109#Issues
Click below ↴ = Copy to Clipboard
Click = Copy
Copied to clipboard!
[[Command-not-found#Issues|Issues]]
Copy as Wikitext
Click = Copy
Copied to clipboard!
[Issues](https://www.kicksecure.com/wiki/Command-not-found?oldid=70109#Issues)
for Discourse, reddit, GitHub
Click = Copy
Copied to clipboard!
[Issues](https://www.kicksecure.com/wiki/Command-not-found?oldid=70109#Issues)
Copy as Markdown
Click = Copy
Copied to clipboard!
[url=https://www.kicksecure.com/wiki/Command-not-found?oldid=70109#Issues]Issues[/url]
Copy as phpBB
Click below ↴ = Open social URL with share data
We don't use embedded scripts
This share button is completely self-hosted by this webserver. No scripts from any of the social networks are embedded on this webserver. See also
Social Share Button.
local variable 'cnf' referenced before assignment[edit]
Copy or share this direct link!
Click = Copy
Copied to clipboard!
https://www.kicksecure.com/wiki/Command-not-found?oldid=70109#local_variable_.27cnf.27_referenced_before_assignment
Click below ↴ = Copy to Clipboard
Click = Copy
Copied to clipboard!
[[Command-not-found#local_variable_.27cnf.27_referenced_before_assignment|local variable 'cnf' referenced before assignment]]
Copy as Wikitext
Click = Copy
Copied to clipboard!
[local variable 'cnf' referenced before assignment](https://www.kicksecure.com/wiki/Command-not-found?oldid=70109#local_variable_.27cnf.27_referenced_before_assignment)
for Discourse, reddit, GitHub
Click = Copy
Copied to clipboard!
[local variable 'cnf' referenced before assignment](https://www.kicksecure.com/wiki/Command-not-found?oldid=70109#local_variable_.27cnf.27_referenced_before_assignment)
Copy as Markdown
Click = Copy
Copied to clipboard!
[url=https://www.kicksecure.com/wiki/Command-not-found?oldid=70109#local_variable_.27cnf.27_referenced_before_assignment]local variable 'cnf' referenced before assignment[/url]
Copy as phpBB
Click below ↴ = Open social URL with share data
We don't use embedded scripts
This share button is completely self-hosted by this webserver. No scripts from any of the social networks are embedded on this webserver. See also
Social Share Button.
- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=917455
- https://salsa.debian.org/jak/command-not-found/-/merge_requests/1
See Also[edit]
Copy or share this direct link!
Click = Copy
Copied to clipboard!
https://www.kicksecure.com/wiki/Command-not-found?oldid=70109#See_Also
Click below ↴ = Copy to Clipboard
Click = Copy
Copied to clipboard!
[[Command-not-found#See_Also|See Also]]
Copy as Wikitext
Click = Copy
Copied to clipboard!
[See Also](https://www.kicksecure.com/wiki/Command-not-found?oldid=70109#See_Also)
for Discourse, reddit, GitHub
Click = Copy
Copied to clipboard!
[See Also](https://www.kicksecure.com/wiki/Command-not-found?oldid=70109#See_Also)
Copy as Markdown
Click = Copy
Copied to clipboard!
[url=https://www.kicksecure.com/wiki/Command-not-found?oldid=70109#See_Also]See Also[/url]
Copy as phpBB
Click below ↴ = Open social URL with share data
We don't use embedded scripts
This share button is completely self-hosted by this webserver. No scripts from any of the social networks are embedded on this webserver. See also
Social Share Button.
apt-file
- command-not-found - WARNING:root:could not open file '/etc/apt/sources.list'
- Speeding up "apt update" with Acquire::Languages=none and Contents-deb::DefaultEnabled=false - It's so much faster!
Footnotes[edit]
Copy or share this direct link!
Click = Copy
Copied to clipboard!
https://www.kicksecure.com/wiki/Command-not-found?oldid=70109#Footnotes
Click below ↴ = Copy to Clipboard
Click = Copy
Copied to clipboard!
[[Command-not-found#Footnotes|Footnotes]]
Copy as Wikitext
Click = Copy
Copied to clipboard!
[Footnotes](https://www.kicksecure.com/wiki/Command-not-found?oldid=70109#Footnotes)
for Discourse, reddit, GitHub
Click = Copy
Copied to clipboard!
[Footnotes](https://www.kicksecure.com/wiki/Command-not-found?oldid=70109#Footnotes)
Copy as Markdown
Click = Copy
Copied to clipboard!
[url=https://www.kicksecure.com/wiki/Command-not-found?oldid=70109#Footnotes]Footnotes[/url]
Copy as phpBB
Click below ↴ = Open social URL with share data
We don't use embedded scripts
This share button is completely self-hosted by this webserver. No scripts from any of the social networks are embedded on this webserver. See also
Social Share Button.
- ↑
Also
apt update
cannot be skipped since package contents files need to be downloaded. - ↑
Acquire::IndexTargets::deb::Contents-deb::DefaultEnabled false;
breaks
command-not-found
because it requires/var/lib/apt/lists/*Contents*
to exist.See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857090


Copy as Wikitext

for Discourse, reddit, GitHub

Copy as Markdown

Copy as phpBB Click below ↴ = Open social URL with share data











We believe security software like Kicksecure needs to remain Open Source and independent. Would you help sustain and grow the project? Learn more about our 12 year success story and maybe DONATE!