Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the Linux shortcut key

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how to use Linux shortcuts. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Under the console / virtual terminal

1. Ctrl-alt-delete-turn off the computer

2. Alt-fn (F1, f2, f3, …) -switch to the nth console

3. Alt-left or alt-right-switch to the previous / next virtual terminal

4. Scroll lock-Lock the input / output of the terminal-use this key to freeze the screen when the screen output scrolls too fast, and press scroll lock again to unlock it.

You can also do this in another way, using ctrl-s to lock the screen and ctrl-q to unlock it. If your console suddenly appears unresponsive for an unknown reason, you can also try the back shortcut key, perhaps because you inadvertently triggered ctrl-s and caused the screen to die.

5. Shift-page up or shift-page down-scroll up and down the console cache. This feature also works when scroll lock is started. The cache content is deleted after the console is replaced with (alt-fn), so scrolling is invalid.

6. Ctrl-l-refresh the screen.

7. Ctrl-c or ctrl-\-Kill the current task

8. Ctrl-d-the function is eof, that is, the end of the file (end-of-file). If your cursor is on a blank command line, you will exit bash, which is much faster than if you exit with the exit command.

9. Ctrl-z-pauses the process. Use the command: bg runs in the background or fg runs in the front end.

Bash & command-line

1. Ctrl-a-move the cursor to the beginning of the command line.

2. Ctrl-e-move the cursor to the end of the command line.

3. Ctrl-u-clears all characters on the command line before the cursor position.

4. Ctrl-w-clear the field on the left

5. Ctrl-y-will be affixed with parts that have been cleared by ctrl-u or ctrl-k or ctrl-w.

6. Ctrl-r-will automatically incrementally search for subsequent characters in the command history cache.

7. Tab-command line auto-completion-automatically completes the current command line. If you enable auto-complete script command parameters and options, you can also automatically complete.

8. Ctrl-k-clears the characters from the position of the prompt to the end of the line.

Kernel shortcuts

The following shortcuts must be enabled in the kernel before they can be used.

And magic key combination (sysrq) must be enabled:

Enable sysrq:

$sudo echo 1 > / proc/sys/kernel/sysrq

Disable sysrq:

$sudo echo 0 > / proc/sys/kernel/sysrq

1. Alt-sysrq-s-synchronizes all mounted file systems. All data in the cache will be written to disk immediately.

2. Alt-sysrq-u-remount all mounted file systems as read-only.

3. Alt-sysrq-b-restart quickly. Do not execute without synchronizing and unmounting the file system, or it will cause serious errors in the file system.

4. Alt-sysrq-s, then alt-sysrq-u, then alt-sysrq-b-synchronize all file systems, remount all file systems read-only, and restart immediately. This is the fastest way to restart linux.

5. Alt-sysrq-h-output other magic key combination list (sysrq) function.

Thank you for reading! This is the end of this article on "how to use Linux shortcuts". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report