On bash command-line, how to delete all letters before cursor? I know Ctrl-k deletes all afterward the cursor.
On bash command-line, how to delete all letters before cursor? I know Ctrl-k deletes
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Ctrl-u–Cut everything before the cursorOther Bash shortcuts,
Move cursor to beginning of lineMove cursor to end of lineMove cursor back one wordMove cursor forward one wordCut the last wordCut everything after the cursorPaste the last thing to be cutUndoAnd discover more via man page for bash shell:
man bashAdditional 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