The Wayback Machine - https://web.archive.org/web/20210219234958/https://www.geeksforgeeks.org/shortcut-to-move-to-the-beginning-or-ending-of-a-command-in-linux-terminal/
Skip to content
Related Articles

Related Articles

Shortcut to Move to the Beginning or Ending of a Command in Linux Terminal
  • Difficulty Level : Basic
  • Last Updated : 21 Nov, 2019

In this article, we will learn how to move to the start and end of a command. We will demonstrate the key combinations in a Git terminal. The same key combinations work in other Unix style terminals too.

Moving to the Starting of the Command

Ctrl + A : The ‘Ctrl+A’ key combination moves the pointer to the start of the command. In the below gif image, you can see how pressing the ‘ctrl+A‘ combination after typing the command ‘touch index.html‘ moved the pointer to the start.

ctrl+a demo on git terminal(unix style terminal)

Moving to the Ending of the Command

Ctrl + E : The ‘Ctrl+E’ key combination moves the pointer to the end of the command. In the below gif image, you can see how pressing the ‘ctrl+E’ combination moves the pointer to the end i.e., at the end of ‘touch app.js‘.

ctrl+e command demo - git bash(unix style terminal)

My Personal Notes arrow_drop_up
Recommended Articles
Page :