Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does anybody know why if I type:

apt-get upg<TAB>

I get:

apt-get upgrade

but if I type:

sudo apt-get upg<TAB>

I get:

sudo apt-get upgrade-from-grub-legacy
share|improve this question
up vote 2 down vote accepted

Found the solution. Some time ago, trying to make bash-completion work also for sudo, I added:

complete -cf sudo

to my .bashrc. Commenting it out makes my sudo apt-get autocomplete correctly.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.