場景:在安裝完docker-machine,設置docker-machine命令自動補齊的時候,出現如下錯誤:docker
-bash: __docker_machine_ps1: 未找到命令bash
解決辦法:在~/.bashrc中文末添加如下三行:app
source /etc/bash_completion.d/docker-machine-wrapper.bash
source /etc/bash_completion.d/docker-machine-prompt.bash
source /etc/bash_completion.d/docker-machine.bashblog
最後從新進行 source /root/.bashrcio