Enabling spell checking for bash
shopt is a built-in command that controls shell behavior. In order to customize our shell environment we add the shopt commands to our .bashrc file.
shopt -s cdspell
This will correct the typing mistakes for cd command. eg: We need to go to directory testing/default. But by mistake type
# cd tesring/default
testing/default
Since we have set cdspell this typing error will be corrected and we will be directed to the correct directory.