> ## Content Index
> Fetch the complete content index at: https://www.albert-yu.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# ubuntu啟動命令列tab鍵自動完成
- URL: https://www.albert-yu.com/blog/ubuntu-enable-tab-completion/
- Published: 2018-01-02T17:58:04.000Z
- Updated: 2026-10-30T03:43:34.000Z
- Author: Albert Yu
- Tags: Linux/Unix, OS, Ubuntu

在安裝完ubuntu後，發現在使用命令列打字時，按tab後後面不會自動補齊命令，也沒有可用的命令提示時

可使用管理員身分開啟/etc/bash.bashrc這個檔案

在下面找到

# enable bash completion in interactive shells

# if \[ -f /etc/bash\_completion \]; then

# . /etc/bash\_completion

# fi

把前面的註解(#)拿掉變成

# enable bash completion in interactive shells

if \[ -f /etc/bash\_completion \]; then  
. /etc/bash\_completion  
fi

儲存後重新啟動就可以生效了