Adding this here just to memorize this good and very often unused keystrokes.Think that each person working with cli at least 1 hour a day should know this rather than moving the arrows 🙂
CTRL + B – Move the cursor left
CTRL + F – Move the cursor right
CTRL + A – Move the cursor to beginning of line
CTRL + E – Move the cursor to the end of the line
CTRL + W – Erase the preceding word
CTRL + U – Erase from cursor to beginning of the line
CTRL + K – Erase from cursor to end of the line
CTRL + Y – Paste erased text
CTRL + P – View the previous command (cursor up)
CTRL + N – Vie the next command (cursor down)
Would like to recommend a great book for Linux newbies who would like to learn a bit more :
How Linux Works: What Every Superuser Should Know