Red Hat shortcut key operation
Category: Linux
1. Use Virtual Console
After logging in, press the "Alt + F2" key to see the "login:" prompt, this is the second virtual console. Generally, newly installed Linux has four virtual consoles, which can be accessed from "Alt + F1" to "Alt + F4". The most useful time of the virtual console is that when a program fails to lock the input, you can switch to another virtual console. After logging in, use the kill command to kill the erroneous process.
2. Copy and paste
After the character interface (whether it is Slackware or RedHat) is installed, it will automatically run a program called gpm each time it is started. After the program is run, you can use the mouse to copy and paste it. The specific method is to hold down the left mouse button and drag to highlight the text to be copied, then the highlighted area has been copied, and then press the right mouse button to copy the content will be pasted at the cursor position.
Under X-Window, the copy operation is the same as under the character interface. If you are using a three-button mouse, press the middle button to paste. If you are using a two-button mouse, you can press the left and right buttons to paste at the same time (provided that when configuring XF86 Select Emulate 3 Button in the mouse settings).
3. Quick access to certain directories
Type cd ~ to enter the user's home directory. Type cd- to enter the last entered directory.
4. Display the color catalog list under RedHat
Open / etc / bashrc and add the following line:
Alias ls = "ls --color"
The next time you start bash, you can display a colored directory list like in Slackware. The meaning of the different colors is as follows:
Blue → catalog
Green → executable file
Red → compressed file
Light blue → link file
Gray → Other documents
5. The path of the command file
When you type some commands (such as find, shutdown, mount, startx), do you want to know which directory these files are placed in? Use the command "whereis" to achieve, such as:
#Whereis startx
6. Find files
Find command needs to add some parameters to find the file, such as:
#Find / usr -name XF86Setup -print
Find the file XF86Setup in / usr.
7. Delete useless core files
After the program is run, sometimes a file named core is generated. This file is generally large and useless. You can delete it to free up space.
8. Norton Commander in Linux
After typing the command mc at the prompt, you will see an interface very similar to Norton Commander. In fact, the function is also very similar or even more powerful. For example, you can directly operate the files in the .tar.gz compressed package (a bit like ZipMagic).
9. Run X-Window program in the background
When executing an X-Window program, don't forget to add an ampersand (such as #netscape &), otherwise, you cannot enter commands in that terminal window before you exit the executed program.
10. Forcibly quit X-Window
Sometimes due to program errors in X-Window, the mouse and keyboard do not work, this time do not worry, because under Linux almost not as vicious crash as in Win 9x, you only need to type Ctrl + Alt + BackSpace key to return The character interface is down
[Ctrl] + [Alt] + [Backspace] = kill your current X session. Kill the graphical desktop session and return you to the login screen. If the normal exit procedure does not work, you can use this method.
[Ctrl] + [Alt] + [Delete] = Shut down and reboot Red Hat Linux. Close your current session and reboot the OS. Use this method only when the normal shutdown procedure does not work.
[Ctrl] + [Alt] + [Fn] = Switch screen. [Ctrl] + [Alt] + One of the function keys will display a new screen. According to the default settings, from [F1] to [F6] is the shell prompt screen, and [F7] is the graphical screen.
[Alt] + [Tab] = Switch tasks in the graphical desktop environment. If you have more than one application open at the same time, you can use [Alt] + [Tab] to switch between open tasks and applications.
[Ctrl] + [a] = Move the cursor to the beginning of the line. It can be used in the URL field of most text editors and Mozilla.
[Ctrl] + [d] = Log off (and close) from the shell prompt. With this shortcut, you don't have to type exit or logout.
[Ctrl] + [e] = Move the cursor to the end of the line. It can be used in most text editors and Mozilla's URL field.
[Ctrl] + [l] = Clear the terminal. This shortcut is the same as typing clear on the command line.
[Ctrl] + [u] = Clear the current line. If you work in the terminal, use this shortcut to clear the characters from the cursor to the beginning of the line.
[Middle mouse button] = Paste the highlighted text. Use the left mouse button to highlight the text. Point the cursor where you want to paste the text. Click the middle mouse button to paste it. In a two-button mouse system, if you configure the mouse to simulate the third button, you can click the left and right buttons of the mouse at the same time to perform the paste.
[Tab] = Command line auto completion. This command can be used when using shell prompts. Type the first few characters of the command or file name, and then press the [Tab] key, it will automatically complete the command or display all the commands that match the characters you type.
[Up] and [Down] arrows = Show command history. When you use the shell prompt, press the [up] or [down] arrow to view the history of commands you typed in the current directory. When you see the command you want to use, press [Enter].
clear = clear the shell prompt screen. Typing it at the command line will clear all the data displayed in this shell prompt screen.
exit = log out. Typing it in the shell prompt will log out the current user or root user account.
history = Show command history. Type it at the shell prompt to display the numbered first 1000 commands you typed. To display a shorter command history, type history f, leave a space blank, and type a number. For example: history 20.
reset = Refresh the shell prompt screen. If the characters are unclear or garbled, typing this command at the shell prompt will refresh the screen.
<Ctrl> <Alt> <F1>
Switch to the first text terminal. You can have up to six different terminals under Linux. The meaning of this command is: "Hold down the <Ctrl> key and <Alt> key at the same time, then press the <F1> key, and then release all keys.
<Ctrl> <Alt> <Fn> (n = 1..6)
Switch to the nth text terminal. (You can also use the command chvt n which is not very often used, n refers to the nth text terminal). Under the text terminal (not in the X window), you can also simply use <ALT> <Fn> to switch, without the <CTRL> key.
Print out the name of the terminal you are using. If you want to know the name of the terminal, you can use the command fgconsole.
<Ctrl> <Alt> <F7>
Switch to the first graphical user interface (generally X-window in the seventh terminal)
<Ctrl> <Alt> <Fn> (n = 7 to 12)
Switch to the nth graphical user street. By default, the first X-Window runs on the seventh terminal and there is nothing from the eighth to the twelfth. Of course, you can start these graphical user interfaces one by one.
<Tab>
(Under the text terminal) You can use TAB to automatically complete commands or display all available options. This shortcut is really easy to use, and you will find it saves you a lot of time if you use it frequently.
<ArrowUp>
(Under the text terminal or X window) Scroll and edit previously entered commands. Press <ENTER> to execute a history command
<ArrowDown>
Rollback
<Shift> <PgUp>
Scroll terminal output. The login prompt also works, so you can use it to roll back the startup information. The memory size of your graphics card determines how much you can roll back
<Shift> <PgDown>
Roll back terminal output
<Ctrl> <Alt> <+>
(Under the X window) Change the screen resolution of the X server (if you set the X server to have multiple screen resolutions). For example, for my standard SVGA card and monitor, the file / etc / X11 / XF86Config has the following setting lines: (from the default, to the maximum virtual screen resolution that can be supported)
Modes "1024x768" "800x600" "640x480" "512x384" "480x300" "400x300" "1152x864" Z
Of course, first of all, I must set up my X server, you can use using Xconfigurator, xf86config, or you can manually edit the file: / etc / X11 / XF86Config. XFdrake (Mandrake uses a graphical user interface for configuration). You can also refer to the commands xvidtune and xvidgen.
<Ctrl> <Alt> <->
(Under the X window) Modify the screen resolution of the X server to the last setting.
<Ctrl> <Alt> <Esc>
(Under X window, KDE) Close the window that my mouse will point to (the shape of the mouse cursor will change). The same effect can also be achieved using the command xkill (on X terminal). It is especially useful when a program window is hanging.
<Ctrl> <Alt> <BkSpc>
(Under the X window) Terminate the current X window service. It can be used if the X window cannot exit normally.
<Ctrl> <Alt> <Delete>
(Applicable to text terminal) Shutdown and restart. This is a normal shutdown command under the text terminal, do not press the reset button on the computer to restart and restart!
<Ctrl> c
Terminate the current process (for general small text mode applications)
<Ctrl> d
(Enter on a blank command line) Exit the current terminal. Take the next command.
<Ctrl> d
Sending files to the current process ends in line. Do not press twice or you will be logged out of the system.
<Ctrl> s
Stop terminal transmission
<Ctrl> q
Start the terminal transmission again. If your terminal suddenly stops responding inexplicably, you can refer to the previous command.
<Ctrl> z
Send the current process to background processing.
exit
Exit system. I can also use the logout command to achieve the same effect. (If you start a second shell program, for example, using bash, this command will make you exit the second shell and return to the first shell, but will not exit the system. Of course, you can use exit again to exit)
reset
Restore the crashed terminal (some terminals display some strange characters) to the default settings. When you use the cat command to prepare a binary file, you may not see the command you entered, although the command still works as usual.
<Middle mouse button>
Paste the currently selected text. This is a regular Linux "copy-paste" operation. It is a very useful extension to the "copy-paste" operation of the widely adopted communication user interface (but it does not support the old version of NetScape, because the old version of NetScape can only use MAC / Windows-style "copy-paste" "Operation. If you run the" setup "program for setting, you can use this function in the text terminal. And it also works well in most dialog boxes, which is really convenient!) If you have a" Linux-Ready "mouse (logitec or its similar products) or you can use this function to the fullest extent by using" simulated three-button mouse ". In general, the simulation of the "third key" is achieved by simultaneously clicking the left and right mouse buttons.
~
(Hydrological compliance) My home directory (generally the book is / home / my login name). For example, the command ~ / my_dir will modify my working directory to the subdirectory "my_dir" of my home directory. Instead of typing "cd ~", you can also just type "cd", and I put all my files in my home directory.
.
(Dot symbol) Current directory. Example: ./my_program will try to execute the "my_program" file in the current directory
..
(Two points) to the current upper level directory (also called "parent directory"). For example, the command "cd .." will modify my current working directory to the previous directory.
Some KDE shortcuts (useful, but not necessary)
<Alt> <Tab>
Switch between different program windows. To switch back, use <Alt> <Shift> <Tab>
<Ctrl> <Tab>
Switch between different desktops. To switch back, use <Ctrl> <Shift> <Tab>
<Ctrl> <Esc>
Display the list of running processes in my system. Allow me to terminate Those processes started by me (or send signals to these processes)
<Alt> <F1>
Access the K menu (equivalent to the "Start" menu of Microsoft Windows).
<Alt> <F12>
Use the arrow keys on the keyboard to simulate mouse operation
<Alt> <left mouse button>
Drag and move a window. Generally speaking, I move a window by dragging the title bar of the window. Sometimes I use it to
A window moves out of the screen. Using this function, I can move the window to any position on the screen.
<Alt> <PrintScreen>
Save a snapshot of the current screen to the clipboard
<Ctrl> <Alt> <PrintScreen>
Save a snapshot of the current desktop to the clipboard
<Ctrl> <Alt> <l>
Lock desktop
<Ctrl> <Alt> <d>
Toggle hide / show desktop function (quickly hiding your card solitaire game when the boss comes over is very useful!)
<Alt> <SysRq> <command_key> (optional)
This is a set of key combinations supported on the Linux kernel (underlying kernel). It means that these key combinations are effective in most cases. The key combination is mainly used for debugging purposes of developers or in emergency situations; you can also use other methods, safety first. The <SysRq> button refers to the PrintScreen button on the PC. The function of the key combination can be activated or deactivated by setting the corresponding kernel parameters, for example: echo "1"> / proc / sys / kernel / sysrq
<Alt> <SysRq> <k>
Terminate all processes (including X windows) running on the current virtual terminal. This key combination is called the "secure access key" (SAK).
<Alt> <SysRq> <e>
Send a TERM signal (end signal) to all running processes except the init process, requiring it to exit
<Alt> <SysRq> <i>
Send KILL (termination signal) to all running processes except the init process. This key combination is more effective than the previous one, but it may also cause some programs to be terminated abnormally.
<Alt> <SysRq> <l>
Send the KILL command to all running processes (including init), the system will no longer be available
<Alt> <SysRq> <s>
Run emergency synchronization (cache write) on all mounted file systems. This protects against data loss
<Alt> <SysRq> <u>
Remount all mounted file systems in read-only mode. This has the same function as the sync key combination above, but has another advantage: if the operation is completed successfully, the next time the hardware is restarted, fsck will not recheck all file systems.
<Alt> <SysRq> <r> Turn off the original mode of the keyboard. It is especially useful when your X window program hangs and does not respond. After using this key combination, you may then start using the <CTRL> <ALT> <DEL> program.
<Alt> <SysRq> <b>
Restart the system immediately without synchronization and uninstallation. You may encounter an error message afterwards.
<Alt> <SysRq> <o>
Shut down (if set correctly)
<Alt> <SysRq> <p>
Export current registers and flags to the console
<Alt> <SysRq> <t>
Export the current task and related information to the console
<Alt> <SysRq> <m>
Export memory contents to console
<Alt> SysRq> <number>
"Number" from 0 to 9. Set the level of console recording, which is used to control which kernel information will be displayed on the console. For example, "0" means that only emergency messages like PANIC and OOPS are displayed on the console.
<Alt> <SysRq> <h>
Display help information. Also, any other unsupported <Alt> <SysRq> <key> key combination will display the same help.
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.