Post

Bash Completion on Ubuntu Minimal Install

When you install Ubuntu as a minimal install, some utilities like command auto-completion are missing.

Here’s how to bring autocomplete back:

1
sudo apt install bash-completion

Then add it to your ~/.bashrc:

1
echo "source /etc/profile.d/bash_completion.sh" >> ~/.bashrc

Or use this idempotent version (won’t duplicate if already present):

1
grep -wq '^source /etc/profile.d/bash_completion.sh' ~/.bashrc || echo 'source /etc/profile.d/bash_completion.sh' >> ~/.bashrc
This post is licensed under CC BY 4.0 by the author.