Linux terminal shortcut keys and create terminal opening shortcut keys

Source: Internet
Author: User

 

Linux terminal usage tips

Today, we found that Linux terminals have so many easy-to-use shortcut keys.

Shift + Ctrl + T: Create a tab

Shift + Ctrl + W: Close the tab

CTRL + Pageup: Previous Tab

CTRL + Pagedown: Next Tab

Shift + Ctrl + Pageup: tab left shift

Shift + Ctrl + Pagedown: Right Shift of the tab

Alt + 1: Switch to Tab 1

Alt + 2: Switch to Tab 2

Alt + 3: Switch to tab 3

Shift + Ctrl + N: New window

Shift + Ctrl + Q: Close the terminal

Terminal copy/paste:

Shift + Ctrl + C: Copy

Shift + Ctrl + V: Paste

Terminal size change:

F11: Full Screen

CTRL + plus: Zoom in

CTRL + minus: Decrease

CTRL + 0: original size

 

Create a shortcut to open the terminal

1. Set shortcuts

Preference --> screen shortcut key, then add a command, and add your shortcut key. If you are using GNOME desktop, we recommend that you use

The gnome-terminal command can be used to add shortcuts, xterm, and shell scripts. For example, I use the following script to call

Command (for the script, seeCode):

/Home/Zhangwei/. gnome2/Nautilus-scripts/open the terminal

 

 

 

2. Set the shortcut key (the current directory when the shortcut key is enabled)

Method 1:

Run the following command:

Sudo apt-Get install Nautilus-open-Terminal

This method is to install a small software, but after I install it, it conflicts with conky, so it is useless.

Method 2:

Use the script to save the following script as any name (my name is: Open the terminal), and then put it in the main directory. Gnome2/Nautilus-ScriptsDirectory, of course, you can put some other common scripts, you can right-click to find them. For example, practical functions such as sending emails/modifying file permissions.

Script:

#! /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

 

 

 

 

 

 

 

Note:Recently, centos6.0 was installed, and (personalized) settings were set.Terminal shortcutAs follows:

 

1. Open the terminal:Alt + S

2. Close the terminal:Alt + q

 

 

The operations are as follows:

1. Open the terminal:

 

 

2. Close the terminal:

 

 

 

 

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.