Monday, April 29, 2024
180
rated 0 times [  180] [ 0]  / answers: 1 / hits: 23990  / 2 Years ago, fri, july 8, 2022, 4:27:37

I use terminal for almost all tasks. Let's say I have entered a huge command like this:



sudo a-huge-command


What is the easiest way to delete the whole command with a single shortcut, rather than keep on hitting backspace key?



I'm a Ubuntu newbie looking to use Ubuntu in a professional way.


More From » command-line

 Answers
3

Use Ctrl+U to cut text from cursor position to the beginning of the command line. Later, if you want, use Ctrl+Y to paste the cut text.



If you just want to discard the current command line and get a new clean prompt hit Ctrl+C.



For more reference please check the Ubuntu documentation for Using The Terminal


[#35770] Saturday, July 9, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ionash

Total Points: 214
Total Questions: 111
Total Answers: 116

Location: Sudan
Member since Thu, May 7, 2020
4 Years ago
;