Home > System Tutorial > LINUX > body text

Which key to press to delete command line in linux

下次还敢
Release: 2024-04-12 13:12:13
Original
1097 people have browsed it

You can use shortcut keys to delete content in the Linux command line, including: Backspace: delete the character before the cursor. Delete: Delete one character after the cursor. Ctrl D: Delete the line where the cursor is. Ctrl K: Delete everything after the line where the cursor is. Ctrl U: Delete everything before the cursor. Ctrl X: Delete the character where the cursor is. Ctrl W: Delete the word where the cursor is. Ctrl Y: Restore recently deleted content. Ctrl _: Delete the word where the cursor is (including spaces).

Which key to press to delete command line in linux

Shortcut keys for deletion in the Linux command line

In the Linux command line, you can use the following shortcut keys to delete Content:

Backspace key (Backspace) : Delete the character before the cursor.

Delete key (Del) : Delete one character after the cursor.

Ctrl D: Delete the line where the cursor is.

Ctrl K: Delete everything after the line where the cursor is.

Ctrl U: Delete everything before the cursor.

Ctrl X: Delete the character where the cursor is.

Ctrl W: Delete the word where the cursor is.

Ctrl Y: Restore recently deleted content.

Ctrl _: Delete the word where the cursor is (including spaces).

Example

  • To delete the character before the cursor, press the Backspace key.
  • To delete one character after the cursor, press the Delete key.
  • To delete the line where the cursor is located, press the Ctrl D shortcut key.
  • To delete everything after the line where the cursor is, press the Ctrl K shortcut key.
  • To restore recently deleted content, press the Ctrl Y shortcut key.

The above is the detailed content of Which key to press to delete command line in linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template