1 快捷鍵 2 3 4 ctrl shift m 我自定義的快捷鍵,能夠給終端命名 5 ctrl shift t 新建標籤頁,而且目錄爲當前目錄 6 ctrl shift pageup 標籤頁往前移 7 ctrl shift pagedown 標籤頁日後移 8 ctrl shift + 放大屏幕 9 ctrl - 縮小屏幕 10 ctrl c 終止程序 11 ctrl d 輸入文件結束符,或退出bash 12 ctrl h 隱藏光標 13 ctrl l 刷新屏幕 14 ctrt n 向下瀏覽歷史命令,至關於下方向鍵 15 ctrl p 向上瀏覽歷史命令,至關於上方向鍵 16 ctrl r 搜索歷史命令 17 ctrl z 將程序掛起 18 ctrl pageup 光標移到前一個標籤頁,會循環 19 ctrl pagedown 光標移到後一個標籤頁 20 shift pageup 緩衝區向上翻頁 21 shift pagedown 向下翻頁 22 23 24 25 背景顏色 26 27 #91D2B3 28 29 30 31 字符編碼 32 33 34 gnome terminal 設置中彷佛沒有設置項來改變終端顯示編碼,只有一個菜單名顯示編碼的設置,並無什麼用處額。不少人推薦改變終端顯示的編碼能夠用luit這個軟件,我試了下,並無什麼做用。個人解決方案是將全部的文件編碼改成系統默認的編碼 utf-8 ,這樣不管在哪都不會出現亂碼了。 35 36 37 38 改變終端光標的顯示 39 40 41 echo -e "\033[?25l" 隱藏光標;\033 (八進制)是輸入字符的值 42 printf("\0033[?25l"); 隱藏光標 43 echo -e "\033[?25h" 顯示光標 44 printf("\0033[?25h"); 顯示光標 45 46 47 \033[0m 關閉全部屬性 48 \033[1m 設置高亮度 49 \033[4m 下劃線 50 \033[5m 閃爍 51 \033[7m 反顯 52 \033[8m 消隱 53 \033[30m -- \033[37m 設置前景色 54 \033[40m -- \033[47m 設置背景色 55 56 \033[nA 光標上移 n 行 57 \033[nB 光標下移 n 行 58 \033[nC 光標右移 n 行 59 \033[nD 光標左移 n 行 60 \033[y;xH 設置光標位置 61 echo -ne "\033[3;1H" 能夠將光標移到第 3 行第 1 列處 62 63 \033[2J 清屏 64 \033[K 清除從光標到行尾的內容 65 \033[s 保存光標位置 66 \033[u 恢復光標位置 67 \033[?25l 隱藏光標 68 \033[?25h 顯示光標 69 70 字顏色 71 30 黑 72 31 紅 73 32 綠 74 33 黃 75 34 藍色 76 35 紫色 77 36 深綠 78 37 白色 79 80 字背景顏色範圍 81 40 黑 82 41 深紅 83 42 綠 84 43 黃色 85 44 藍色 86 45 紫色 87 46 深綠 88 47 白色 89 echo -ne "\033[32m" 能夠將字符的顯示顏色改成綠色 90 91 92 93 更改默認的終端大小 94 95 新終端的默認大小能夠在編輯 > 配置文件首選項 中調整 96 97 98 99 新終端採用當前目錄 100 101 By default new terminals open in the $HOME directory. To have new terminals adopt the current working directory: source /etc/profile.d/vte.sh. Add the command to the shell configuration to retain the behaviour. 102 103 104 Pad the terminal 105 106 To pad the terminal (create a small, invisible border between the window edges and the terminal contents) create the file below: 107 ~/.config/gtk-3.0/gtk.css 108 109 VteTerminal, 110 TerminalScreen { 111 padding: 10px 10px 10px 10px; 112 -VteTerminal-inner-border: 10px 10px 10px 10px; 113 } 114 115 116 117 禁用光標閃爍 118 119 Since GNOME 3.8 and the migration to GSettings and DConf the key required to modify in order to disable the blinking cursor in the Terminal differs slightly in contrast to the old GConf key. To disable the blinking cursor in GNOME 3.8 and above use: 120 $ gsettings set org.gnome.desktop.interface cursor-blink false 121 122 To disable the blinking cursor in Terminal only use (make sure profile uid is correct one): 123 $ dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/cursor-blink-mode "'off'" 124 125 Note that gnome-settings-daemon, from the package of the same name, must be running for this and other settings changes to take effect in GNOME applications - see GNOME#Configuration. 126 127 128 129 關閉終端時,禁用確認窗口 130 131 試圖關閉該窗口,終端中正在運行一個程序時,終端將始終顯示一個確認窗口。爲了不這種狀況,執行如下命令: 132 $ gsettings set org.gnome.Terminal.Legacy.Settings confirm-close false 133 134 135 136 參考: 137 138 139 https://wiki.archlinux.org/index.php/GNOME_%28%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87%29#.E7.A6.81.E7.94.A8.E5.85.89.E6.A0.87.E9.97.AA.E7.83.81