01. Efficient Cursor Movements

Let's learn some shortcuts for quick navigation around the command line.

Type the following sentence out into your command line for practice.

$ hello I am a testing monkey

Moving to the beginning and end of line

We can use the ctrl-key (^) to move our cursor:

To beginning of the line (bol).
To end of line (eol).

Moving a character or word at a time

We can move through either a character or a word at a time.

Forward one character.
Backward one character.
Move cursor forward one word.
Move cursor backward one word.

Transposing letters or words

Sometimes when we type really fast, we switch letters or words around.

We can fix this with transpose:

Switches the character with the one next to it.
transpose the word at the cursor location with the one preceding it.

Try it with these examples here:

$ java helloWordl
$ ls directoryName -l

Changing casing

To convert to lower or uppercase:

Convert characters from cursor to end of the word to lowercase.
Same as above, but to uppercase.

Deleting characters or words

To delete (or kill) characters or words, use the following:

Delete the character at the cursor location.
Kill the text from the cursor location to eol.
Kill text from the cursor location to bol.
Kill text from the cursor location to the end of the current word.

Clearing the terminal window

If the terminal window seems cluttered and we'd like to clear everything, we type:

$ clear 

Or to be more efficient, just hit ^l.

Aching back from coding all day?

Inversion Therapy Table

Aching back from coding all day? Try Back Problems

Stretch out your back and relieve your back muscles with inversion therapy. This device counteracts the forces of gravity on the body by decompressing and elongating the spine. By using this product just ten minutes a day, you can be well on your way to improved circulation and posture while relieving muscle aches, back pain and stress.

$$ Check price
119.98119.98Amazon 4.5 logo(1,700+ reviews)

More Back Problems resources

Take your Linux skills to the next level!

System Admin Handbook

Take your Linux skills to the next level! Try Linux & UNIX

This book approaches system administration in a practical way and is an invaluable reference for both new administrators and experienced professionals. It details best practices for every facet of system administration, including storage management, network design and administration, email, web hosting, scripting, and much more.

$ Check price
74.9974.99Amazon 4.5 logo(142+ reviews)

More Linux & UNIX resources