Linux下終端的快速鍵及建立開啟終端的快速鍵

來源:互聯網
上載者:User

 

Linux終端提示

今天才發現Linux下的終端有這麼多好用的快速鍵。

Shift+Ctrl+T:建立標籤頁

Shift+Ctrl+W:關閉標籤頁

Ctrl+PageUp:前一標籤頁

Ctrl+PageDown:後一標籤頁

Shift+Ctrl+PageUp:標籤頁左移

Shift+Ctrl+PageDown:標籤頁右移

Alt+1:切換到標籤頁1

Alt+2:切換到標籤頁2

Alt+3:切換到標籤頁3

Shift+Ctrl+N:建立視窗

Shift+Ctrl+Q:關閉終端

終端中的複製/粘貼:

Shift+Ctrl+C:複製

Shift+Ctrl+V:粘貼

終端改變大小:

F11:全屏

Ctrl+plus:放大

Ctrl+minus:減小

Ctrl+0:原始大小

 

建立開啟終端的快速鍵

一、設定快速鍵

喜好設定 --> 螢幕快速鍵,然後添加一個命令,並添加一個你的快速鍵,如果你用的是gnome案頭建議用 

gnome-terminal命令添加快速鍵,也可以用xterm,還可以用shell指令碼,比如我用的是調用下面我貼的一個指令碼

命令(指令碼見文代碼):

/home/zhangwei/.gnome2/nautilus-scripts/開啟終端

 

 

 

二、設定右鍵快速鍵(開啟時為目前的目錄)

方法一:

執行命令:

sudo apt-get install nautilus-open-terminal

此方法是安裝一個小軟體,但是我安裝後和conky衝突了,所以沒有用。

方法二:

用指令碼,把下面的指令碼儲存成任意名(我的是:開啟終端),然後放在主目錄的.gnome2/nautilus-scripts目錄下,當然你可以放一些其他常見的指令碼,都可以在右鍵找到。比如發送到郵件/修改檔案許可權等等實用的功能。

指令碼:

#!/bin/bash
#
# This script opens a gnome-terminal in the directory you select.
#
# Distributed under the terms of GNU GPL version 2 or later
#
# Install in ~/.gnome2/nautilus-scripts or ~/Nautilus/scripts
# You need to be running Nautilus 1.0.3+ to use scripts.

# When a directory is selected, go there. Otherwise go to current
# directory. If more than one directory is selected, show error.
if [ -n "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" ]; then
set $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
if [ $# -eq 1 ]; then
destination="$1"
# Go to file's directory if it's a file
if [ ! -d "$destination" ]; then
destination="`dirname "$destination"`"
fi
else
zenity --error --title="Error - Open terminal here" \
--text="You can only select one directory."
exit 1
fi
else
destination="`echo "$NAUTILUS_SCRIPT_CURRENT_URI" | sed 's/^file:\/\///'`"
fi

# It's only possible to go to local directories
if [ -n "`echo "$destination" | grep '^[a-zA-Z0-9]\+:'`" ]; then
zenity --error --title="Error - Open terminal here" \
--text="Only local directories can be used."
exit 1
fi

cd "$destination"
exec x-terminal-emulator

 

 

 

 

 

 

 

說明:最近安裝了個CentOS6.0,(個人化地)設定了終端的快速鍵如下:

 

1.開啟終端:alt + s

2.關閉終端:alt + q

 

 

操作如下

1.開啟終端:

 

 

2.關閉終端:

 

 

 

 

 

 

 

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.