Move Your Cursor Faster in Terminal

It could be quite annoying to change argument values when we have many arguments and long argument values, for example:

bazel-bin/tensorflow/lite/tools/evaluation/tasks/imagenet_image_classification/run_eval \
--model_file=/home/ubuntu/models/efficientnet_b0_quant.tflite \--ground_truth_images_path=/home/ubuntu/data/ilsvrc12_val/ \
--ground_truth_labels=/home/ubuntu/data/ground_truth_labels.txt \
--model_output_labels=/home/ubuntu/data/labels_mobilenet_quant_v1_224.txt \
--output_file_path=/home/ubuntu/models/accuracy_output_lite.txt \
--num_images=100 \

We can then use some shortcuts to move the cursor faster.

1.Move to the begining:

Ctrl + A

2. Move to the end:

Ctrl + E

3. Move forward a word:

If you are using MacOS, you need to enable Use option as meta key:

Open Terminal > Preferences > Settings > Keyboard, and enable Use option as meta key.

Meta key, by convention, is used for operations on word.

Then you can move forward a word by:

Alt + F

or on MacOS:

Option + F

4. Move backward a word:

Alt / Option + B


  1. Shortcuts to move faster in Bash command line