July 4, 2011
Disable
1. Remove the package "command-not-found"
sudo apt-get remove command-not-found
2. Change folder name from command-not-found to command-not-found.bak
sudo mv /usr/share/command-not-found /usr/share/command-not-found.bak
(this will fix the bug "/usr/bin/python: can’t find ‘__main__.py’ in ‘/usr/share/command-not-found’")
Enable
1. Restore folder name
sudo mv /usr/share/command-not-found.bak /usr/share/command-not-found
2. Install the package "command-not-found"
sudo apt-get install command-not-found
Reference:
How to disable command-not-found in Ubuntu
1. Remove the package "command-not-found"
sudo apt-get remove command-not-found
2. Change folder name from command-not-found to command-not-found.bak
sudo mv /usr/share/command-not-found /usr/share/command-not-found.bak
(this will fix the bug "/usr/bin/python: can’t find ‘__main__.py’ in ‘/usr/share/command-not-found’")
Enable
1. Restore folder name
sudo mv /usr/share/command-not-found.bak /usr/share/command-not-found
2. Install the package "command-not-found"
sudo apt-get install command-not-found
Reference:
How to disable command-not-found in Ubuntu








