We can quickly move the cursor to a specific location with the shortcut key provided by the shell.

Move cursor to the new line

We can move the cursor to the beginning of the new line:

1
Ctrl + C    # press Control and C keys
img

before moving

img

after moving

Move cursor to the beginning

We can move the cursor to the beginning of the line:

1
Ctrl + A    # press Control and A keys
img

before moving

img

after moving

Move cursor to the end

We can move the cursor to the end of the line:

1
Ctrl + E    # press Control and E keys
img

before moving

img

after moving

Move cursor forward a char

We can move the cursor to the next char:

1
Ctrl + F    # press Control and F keys
img

before moving

img

after moving

Move cursor backward a char

We can move the cursor to the previous char:

1
Ctrl + B    # press Control and B keys
img

before moving

img

after moving

Move cursor forward a word

We can move the cursor to the end of the word:

1
ALT + F    # press Alternate and F keys
img

before moving

img

after moving

Move cursor backward a word

We can move the cursor to the the first char of the word:

1
ALT + B    # press Alternate and B keys
img

before moving

img

after moving

Clear the screen

We can clear the screen:

1
Ctrl + L    # press Control and L keys
img

before clearing

img

after clearing

References 8.4.1 Commands For Moving

Buy me a coffeeBuy me a coffee