
ubuntu 鍵盤快捷鍵

We’re always looking for new ways to speed up everyday tasks in Ubuntu. We’ll show you some keyboard shortcuts you might not have known about, and show you how to make your own custom shortcuts.
我們一直在尋找新的方法來加快Ubuntu中的日常任務。 我們將向您展示一些您可能不了解的鍵盤快捷鍵,并向您展示如何制作自己的自定義快捷鍵。
當鍵盤統治地球 (When Keyboards Ruled the Earth)
Unix—the spiritual predecessor of Linux—predates graphical user interfaces. The keyboard was the only game in town, so it was typing all the way. No surprise then, that functionality was soon introduced for the benefit?of the computer operators of yesteryear.
Unix(Linux的精神前身)早于圖形用戶界面。 鍵盤是鎮上唯一的游戲,因此一直在打字。 毫不奇怪,該功能很快就為過去的計算機操作員帶來了好處。
Features such as?the?history
?command?and aliases started to appear in Unix shells. Their purpose was to increase productivity by reducing repetition and removing the need to remember obscure sequences of commands.
history
命令和別名之類的功能開始出現在Unix shell中。 他們的目的是通過減少重復和消除記住晦澀的命令序列來提高生產率。
Keyboard shortcuts boost efficiency, too. These are neat combinations of keystrokes that trigger some useful action for us. They don’t type text, they cause something to happen.
鍵盤快捷鍵也可以提高效率。 這些是擊鍵的巧妙組合,可為我們觸發一些有用的操作。 他們不輸入文字,他們導致某些事情發生。
We’re going to look at some of the more useful Ubuntu keyboard shortcuts, both for the terminal and on Ubuntu’s GNOME Shell desktop. We’ll also demonstrate how to create your own shortcuts by applying the keystrokes of your choice to the action you want to perform. We tested this keyboard shortcuts on Ubuntu 19.04 Disco Dingo.
我們將在終端和Ubuntu的GNOME Shell桌面上查看一些更有用的Ubuntu鍵盤快捷鍵。 我們還將演示如何通過將您選擇的按鍵應用于您要執行的操作來創建自己的快捷方式。 我們在Ubuntu 19.04 Disco Dingo上測試了此鍵盤快捷鍵。
超級什么? (Super What?)
The Super key is the one between the Ctrl and Alt keys toward the bottom left corner of the keyboard. On most keyboards, this will have a Windows symbol on it—in other words, “Super” is an operating system-neutral name for the Windows key. We’ll be making good use of the Super key.
超級鍵是鍵盤左下角的Ctrl和Alt鍵之間的鍵。 在大多數鍵盤上,其上將帶有Windows符號-換句話說,“超級”是Windows鍵的與操作系統無關的名稱。 我們將充分利用Super鍵。
終端的鍵盤快捷鍵 (Keyboard Shortcuts for the Terminal)

The following keyboard shortcuts work in GNOME Terminal—Ubuntu’s built-in terminal application. If they don’t seem to work, click menu > Preferences > Shortcuts in a Terminal window and ensure “Enable Shortcuts” is checked.
以下鍵盤快捷鍵在GNOME終端(Ubuntu的內置終端應用程序)中有效。 如果它們似乎不起作用,請在“終端”窗口中單擊菜單>首選項>快捷方式,并確保選中“啟用快捷方式”。
Use these keyboard shortcuts to speed up your Linux command line experience:
使用以下鍵盤快捷鍵可以加快Linux命令行體驗:
打開和關閉終端窗口 (Opening and Closing Terminal Windows)
Ctrl+Alt+T? or Shift+Ctrl+N:?Open a terminal window.
Ctrl + Alt + T或Shift + Ctrl + N :?打開一個終端窗口。
Shift+Ctrl+Q: Close the current terminal window
Shift + Ctrl + Q:關閉當前終端窗口
終端窗口選項卡(Terminal Window Tabs)
Shift+Ctrl+T:?Open a new tab.
Shift + Ctrl + T:打開一個新標簽。
Shift+Ctrl+W Close the current tab.
Shift + Ctrl + W關閉當前選項卡。
Ctrl+Page Up: Switch to the previous tab.
Ctrl + Page Up :切換到上一個選項卡。
Ctrl+Page Down: Switch to the next tab.
Ctrl + Page Down:切換到下一個選項卡。
Shift+Ctrl+Page Up: Move to the tab to the left.
Shift + Ctrl +向上翻頁:移到左側的標簽。
Shift+Ctrl+Page Down: Move to the tab to the right.
Shift + Ctrl + Page Down :移至右側的標簽。
Alt+1: Switch to Tab 1.
Alt + 1 :切換到標簽1。
Alt+2: Switch to Tab 2.
Alt + 2 :切換到標簽2。
Alt+3: Switch to Tab 3, and so on, up to Alt+9 to switch to tab 9
Alt + 3 :切換到選項卡3,依此類推,直到Alt + 9切換到選項卡9
Alt+0: Switch to Tab 10.
Alt + 0 :切換至標簽10。
命令行編輯 (Command Line Editing)
Shift+Ctrl+C: Copy the highlighted text. You must use the mouse to highlight the text.
Shift + Ctrl + C:復制突出顯示的文本。 您必須使用鼠標突出顯示文本。
Shift+Ctrl+V: Paste the copied text in a terminal window. If you are pasting into an application such as an editor, Ctrl+V will probably work.
Shift + Ctrl + V:將復制的文本粘貼到終端窗口中。 如果要粘貼到諸如編輯器之類的應用程序中,則Ctrl + V可能會起作用。
Ctrl+A or Home: Go to the start of a command line.
Ctrl + A或Home :轉到命令行的開頭。
Ctrl+E or End: Go to the end of a command line.
Ctrl + E或End :轉到命令行的末尾。
Alt+B?or Ctrl+Left Arrow: Move the cursor backward one word.
Alt + B或Ctrl +向左箭頭:將光標向后移動一個單詞。
Ctrl+B?or Left Arrow: Move the cursor backward one character.
Ctrl + B或向左箭頭:將光標向后移動一個字符。
Alt+F?or Ctrl+Right Arrow: Move the cursor forward one word.
Alt + F或Ctrl +向右鍵:將光標向前移動一個單詞。
Ctrl+F or Right Arrow: Move the cursor forward one character.
Ctrl + F或向右箭頭:將光標向前移動一個字符。
Ctrl+XX: Hop between the current position of the cursor and the start of the line. Hold down Ctrl and Press X twice, quickly.
Ctrl + XX :在光標的當前位置和行的開頭之間跳轉。 按住Ctrl并快速按兩次X。
Ctrl+D or Delete: Delete the character under the cursor.
Ctrl + D或Delete :刪除光標下方的字符。
Ctrl+U: Delete all characters before the cursor. Ctrl+E, Ctrl+U will delete the entire line.
Ctrl + U :刪除光標之前的所有字符。 Ctrl + E , Ctrl + U將刪除整行。
Alt+D: Delete all characters after the cursor to the end of the line.
ALT + d:光標移動到行的結尾后刪除所有字符。
Ctrl+H or Backspace: Delete the character before the cursor.
Ctrl + H或Backspace :刪除光標之前的字符。
控制終端顯示 (Controlling The Terminal Display)
Ctrl+L: Clear the terminal window. Same as typing
clear
.Ctrl + L :清除終端窗口。 與鍵入
clear
相同。Ctrl+S: Stop scrolling output. Freezes the output from a? program, but allows the program to continue to run in the background.
Ctrl + S :停止滾動輸出。 凍結程序的輸出,但允許程序繼續在后臺運行。
Ctrl+Q: Restart scrolling output if it has been stopped with Ctrl+S.
Ctrl + Q :如果已使用Ctrl + S停止滾動輸出,則重新開始滾動輸出。
縮放終端窗口 (Zooming the Terminal Window)
Shift+Ctrl++ (that is,?Shift, Ctrl and +, “the plus sign”): Zoom in.
Shift + Ctrl ++ (即Shift , Ctrl和+, “加號”):放大。
Ctrl+- (that is,?Shift, Ctrl and -, “the minus sign“): Zoom out.
Ctrl +- (即Shift , Ctrl和-,“減號” ):縮小。
F11: Full screen.
F11 :全屏。
Ctrl+0?(that is,?Ctrl and 0, “zero”): Return to normal size.
Ctrl + 0 (即Ctrl和0 ,“零”):返回正常大小。
在終端窗口中搜索 (Searching in a Terminal Window)
Shift+Ctrl+F: Find.
Shift + Ctrl + F鍵:查找。
Shift+Ctrl+G: Find the next occurrence of the search term.
Shift + Ctrl + G :查找搜索詞的下一個匹配項。
Shift+Ctrl+H: Find the previous occurrence of the search term.
Shift + Ctrl + H :查找搜索詞的上一個匹配項。
Shift+Ctrl+J: Clear text highlights.
Shift + Ctrl + J :清除文本突出顯示。
For more keyboard shortcuts, check out our list of Bash shortcuts—these work in any Linux terminal, even outside of the desktop.
有關更多鍵盤快捷鍵的信息,請查看我們的Bash快捷鍵列表,這些快捷鍵可以在任何Linux終端中使用,甚至可以在桌面之外使用。
桌面鍵盤快捷鍵 (Desktop Keyboard Shortcuts)

Ubuntu’s GNOME desktop environment offers many different keyboard shortcuts for navigating your desktop and working with windows, too.?If you’re still doing all these things the long mouse-driven way, stop!
Ubuntu的GNOME桌面環境提供了許多不同的鍵盤快捷鍵,用于瀏覽桌面和使用Windows。 如果您仍然要以鼠標驅動的方式進行所有這些操作,請停止!
Alt+F2: Run a command. Opens the “Enter a Command” dialog. You can use this to launch applications, run commands, and run scripts.
Alt + F2 :運行命令。 打開“輸入命令”對話框。 您可以使用它來啟動應用程序,運行命令和運行腳本。

Super+D: Minimizes all windows and shows the desktop.
Super + D :最小化所有窗口并顯示桌面。
Super+Tab or?Alt+Tab: Switch applications.
Super + Tab或Alt + Tab :切換應用程序。
Ctrl+Alt+Up Arrow: Move to the previous workspace.
Ctrl + Alt +向上箭頭:移至上一個工作區。
Ctrl+Alt+Down Arrow: Move to the next workspace.
Ctrl + Alt +向下箭頭:移至下一個工作區。
Shift+Ctrl+Alt+Up Arrow: Move an application to the previous workspace.
Shift + Ctrl + Alt +向上箭頭:將應用程序移動到上一個工作區。
Shift+Ctrl+Alt+Down Arrow: Move an application to the next workspace.
Shift + Ctrl + Alt +向下箭頭:將應用程序移動到下一個工作區。
Super+Left Arrow: Snap the current application so that it takes up the left side of the screen.
Super + Left Arrow :捕捉當前應用程序,使其占據屏幕的左側。
Super+Right Arrow: Snap the current application so that it takes up the right side of the screen.
Super + Right箭頭:對齊當前應用程序,使其占據屏幕的右側。
Super+Up Arrow: Maximize the current application.
Super +向上箭頭:最大化當前應用程序。
Super+Down Arrow: Restore down (that is, reduce but don’t minimize) the current application.
Super + Down箭頭:還原(即減少但不要最小化)當前應用程序。
Super+M or Super+V: Display the notifications are and Calendar.
Super + M或Super + V :顯示通知為和日歷。
Super+Space: Switches between input sources. For example, if you have a laptop with a US keyboard and you also use it with an external UK keyboard, you’d find this useful.
Super + Space :在輸入源之間切換。 例如,如果您有一臺帶有美式鍵盤的筆記本電腦,并且還與一臺外接式英國鍵盤一起使用,那么您會發現這很有用。
Ctrl+Alt+L: Locks the screen so that you need to log back in. Makes it safe to leave your computer unattended.
Ctrl + Alt + L :鎖定屏幕,以便您需要重新登錄。可以安全地使計算機無人看管。
Ctrl+Alt+Del: Logs you out of the current session.
Ctrl + Alt + Del :使您退出當前會話。
通用鍵盤快捷鍵 (Common Application Keyboard Shortcuts)
Many applications follow certain conventions with keyboard shortcuts. These should work in most modern applications.
許多應用程序使用鍵盤快捷鍵遵循某些約定。 這些應該可以在大多數現代應用程序中工作。
Ctrl+Q or Ctrl+W or Alt+F4: Close application.
Ctrl + Q或Ctrl + W或Alt + F4 :關閉應用程序。
Ctrl+P: Open the Print dialog.
Ctrl + P :打開“打印”對話框。
Ctrl+S: Save the current file.
Ctrl + S :保存當前文件。
Shift+Ctrl+S: Open the File Save dialog.
Shift + Ctrl + S :打開“文件保存”對話框。
Ctrl+O: Open the Open File dialog.
Ctrl + O :打開“打開文件”對話框。
如何創建自定義鍵盤快捷鍵 (How to Create Custom Keyboard Shortcuts)
You can create your own keyboard shortcuts and attach them to some action you wish to have carried out when that keyboard shortcut is used.
您可以創建自己的鍵盤快捷鍵,并將它們附加到使用該鍵盤快捷鍵時希望執行的某些操作。
To create your own keyboard shortcut, open the “System Menu” and click on the “Settings” icon:
要創建自己的鍵盤快捷方式,請打開“系統菜單”,然后單擊“設置”圖標:

In the “Settings” dialog, click on the “Devices” menu entry. This is near the bottom of the sidebar.
在“設置”對話框中,單擊“設備”菜單項。 這是在側邊欄的底部附近。

Click on the “Keyboard” menu entry.
單擊“鍵盤”菜單項。

Scroll down through the list of existing keyboard shortcuts, and click the “+” button at the bottom of the list.
向下滾動現有的鍵盤快捷鍵列表,然后單擊列表底部的“ +”按鈕。

In the “Add Custom Shortcut” dialog, give your new shortcut a descriptive name in the “Name” field.
在“添加自定義快捷方式”對話框中,在“名稱”字段中為新的快捷方式指定一個描述性名稱。
In the “Command” field, provide the command that you wish to have executed when your shortcut is used.
在“命令”字段中,提供使用快捷方式時希望執行的命令。
In this example, we’re going to launch Nautilus. We need to type the command that will launch Nautilus, which is “nautilus
“.
在此示例中,我們將啟動Nautilus。 我們需要輸入將啟動Nautilus的命令,即“ nautilus
”。

When you have filled in the “Name” and “Command” fields, click the “Set Shortcut” button. When you see the “Enter the New Shortcut” prompt, press the keys you wish to use for the shortcut.
填寫“名稱”和“命令”字段后,單擊“設置快捷方式”按鈕。 當您看到“輸入新快捷方式”提示時,請按一下您希望用于快捷方式的鍵。

In our example, we will press Super+E.
在我們的示例中,我們將按Super + E。

When all fields are completed, click the green “Add” button. This will save your shortcut and add it to the list of existing shortcuts.
完成所有字段后,單擊綠色的“添加”按鈕。 這將保存您的快捷方式并將其添加到現有快捷方式列表中。
If you scroll down through the list of existing shortcuts you’ll see a new section titled “Custom Shortcuts”. Your new shortcut will be listed in that section.
如果您在現有快捷方式列表中向下滾動,則會看到一個名為“自定義快捷方式”的新部分。 您的新快捷方式將在該部分列出。

And now, pressing Super+E?will launch Nautilus. Close the window, and test out your shortcut! It’ll become second nature in no time.
現在,按Super + E將啟動Nautilus。 關閉窗口,然后測試您的快捷方式! 它將立即成為第二天性。
While you’re in the Keyboard Shortcuts window, be sure to look through the list and change shortcuts as you see fit! If your keyboard doesn’t have media keys, for example, you can assign one of the F-keys to volume up and volume down.
在“鍵盤快捷鍵”窗口中時,請務必瀏覽列表并根據需要更改快捷鍵! 例如,如果您的鍵盤沒有媒體鍵,則可以將F鍵之一分配給調高音量和調低音量。
Custom shortcuts aren’t just for opening your favorite programs quickly. You can write a short script to automate some common task and bind that script to a keystroke! The possibilities are endless.
自定義快捷鍵不僅用于快速打開您喜歡的程序。 您可以編寫一個簡短的腳本來自動執行一些常見任務,并將該腳本綁定到按鍵! 可能性是無止境。
使用快捷方式 (Using Your Shortcuts)
Keyboard shortcuts can leave you in a quandary.?When you start using them, they slow you down! Because they are unfamiliar and they take a moment to look up, they can feel like an impediment more than an accelerator.
鍵盤快捷鍵可能會讓您陷入困境。 當您開始使用它們時,它們會使您減速! 因為它們不熟悉,并且花了一些時間來查找,所以它們比加速器更像障礙。
Don’t be disheartened, persevere. There’s no instant gratification here.?But once you have them locked into your muscle memory, you’re up and running.
不要灰心,堅持下去。 這里沒有即時的滿足感。 但是,一旦將它們鎖定在您的肌肉記憶中,就可以啟動并運行。
Pick a handful and start to use those. When they become second nature, add a few more. Then repeat. You’ll wonder how you ever managed without them. It’s like learning the Linux terminal.
選擇一些并開始使用它們。 當它們成為第二天性時,再添加一些。 然后重復。 您會想知道如果沒有它們,您將如何管理。 這就像學習Linux終端。
翻譯自: https://www.howtogeek.com/howto/41418/how-to-be-more-productive-in-ubuntu-using-keyboard-shortcuts/
ubuntu 鍵盤快捷鍵