To install and enable Bash auto completion in Fedora Linux, you can use the following steps:
- Install the bash-completion package by running the command:
sudo dnf install bash-completion
- To enable bash-completion for all users, add the following line to the /etc/bashrc file:
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
fi
- To enable bash-completion for the current user only, add the same line to the ~/.bashrc file
- If you want to enable it only for certain users, add the line to the appropriate user’s ~/.bashrc file
- To apply the changes without logging out and logging in again, you can run the following command:
source /etc/bashrc
or
source ~/.bashrc
After this, you will be able to use the tab key to auto complete commands and arguments, making it easier and faster to work with the command line.