'How to quickly jump to the beginning of a command on terminal?

For example:

% grep my_words /xx/xx/xx/xx/xx/xx/xx/xx/name.txt

When I am the end of the command line, I often need to jump to the beginning, i.e. before grep or after the grep command. I have to move backward character by character, and it's very slow.

How to do that?



Solution 1:[1]

You can simply click the home key to move the cursor to the start of the command.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Danyal Ahmad