One of the advantages of Linux over DOS is that it has the command complementing function. However, in Fedora or CentOS, after sudo is used, it is impossible to use TAB for command completion, let alone parameter completion. In fact, Bashshell 2.05 and later versions support the script-based Extended Instruction Set (commandcompletion). In Ubuntu, this function is supported by default, however, this function is not available in the default Fedora system.
One of the advantages of Linux over DOS is that it has the command complementing function. However, in Fedora or CentOS, after sudo is used, it is impossible to use TAB for command completion, let alone parameter completion.
In fact, Bash shell 2.05 and later versions support script-based extension of the Instruction Set (command completion). In Ubuntu, this function is supported by default, however, this function is not available in the Fedora system by default. To complete commands and command parameters in the sudo environment, install bash-completion first.
Bash-completion: a bash shell script that contains a large number of command modes.
Installation:
Sudo yum install bash-completion
Edit the. bashrc file and add:
# Use bash-completion, if available
If [-f/etc/bash_completion]; then
./Etc/bash_completion
Fi
Then execute:
Source/etc/bash_completion
Now we have all the completion functions of sudo + command + TAB.