虛擬機(jī)中通過(guò)終端的新建標(biāo)簽頁(yè)的快捷方式,每次都打開的~/目錄的解決辦法
這個(gè)問(wèn)題似乎只在虛擬機(jī)中出現(xiàn),如果物理運(yùn)行的centos7 系統(tǒng),在終端中打開的新的標(biāo)簽頁(yè)的時(shí)候,默認(rèn)就是當(dāng)前文件夾目錄下的。具體的解決辦法如下:
1、在終端打開用戶目錄
cd ~
2、編輯.bashrc文件
?vim .bashrc
3、在合適的位置加上對(duì)應(yīng)的代碼:
3.1 如果想修改的是ctrl + T快捷鍵的話 :
# Open new terminal tab in current directory
if [[ $TERM = xterm* ]]; then
? ? bind -x '"\C-t": "gnome-terminal && cd $PWD"';
fi
3.2 如果想修改的是 ctrl + shift + t的話:
# Open new terminal tab in current directory with Ctrl + Shift + T
if [[ $TERM = xterm* ]]; then
? ? bind -x '"\e[1;6C": "gnome-terminal && cd $PWD"';
fi
4、重載 bashrc 文件
source .bashrc
標(biāo)簽: