On bash command-line, how to delete all letters before cursor? I know Ctrl-k deletes all afterward the cursor.
Click the left mouse button to place the cursor after the last character. Press Backspace one or more times to delete the characters in front of the cursor.
ctrl+z stops the process and returns you to the current shell. You can now type fg to continue process, or type bg to continue the process in the background. Research "bash job control" and see bash manual Job Control Basics.
Ctrl-u
- Cut everything before the cursor
Other Bash shortcuts,
Move cursor to beginning of line
Move cursor to end of line
Move cursor back one word
Move cursor forward one word
Cut the last word
Cut everything after the cursor
Paste the last thing to be cut
Undo
And discover more via man page for bash shell: man bash
Additional bash command-line shortcut cheat sheet: http://www.bigsmoke.us/readline/shortcuts
See the documentation here: http://www.gnu.org/software/bash/manual/bashref.html#Commands-For-Killing
Obligatory: Learn more about Bash, Linux, and Tech through Julia's comics: https://twitter.com/b0rk/media
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With