Today is going to be another simple article, where you learn to navigate to the start or end of the line – in the terminal, of course. I’ve had some abdominal issues, so it seems like a good day for yet another accessible article.
Even though it’s an easy article, there will be many Linux users who don’t know this information. I’m not even sure how to describe it, thus the unwieldy article headline. So, if you want to navigate to the start or end of the line in the terminal, I’ll show you how.
This being Linux, there are so many ways to do this sort of stuff…
Imagine this:
You’re using Ubuntu and you want to update from within the terminal. So, you’ve typed the following:
1 | sudo apt update && sudo apt upgrade -y |
Well, as you can see, the first instance of ‘sudo’ was spelled wrong – it’s missing a letter. You can reach over there and find the arrow buttons, navigate back to the start of the line, and fix it. Or, you can do the following:
Navigate To The Start Or End Of The Line:
As the title indicates, this is in the terminal. As such, you’ll need an open terminal to try this out. Just press
With your terminal now open, why don’t we just use that line from above:
1 | sudo apt update && sudo apt upgrade -y |
Of course, you could just look at your keyboard and (probably) use the
But, you don’t have to reach for those lines. Nope. That is not necessary. You can keep your eyes right on the screen. How so?
Well, it’s this easy:
To navigate to the start of the line, press
To navigate to the end of the line, press
Tada! You don’t have to root around for the home or end buttons. You don’t have to fuss with the arrow buttons. You can quickly and easily navigate to the start and end of the line with just those two keyboard shortcuts. I told you that it’d be quick and easy!
Closure:
There you have it, you have another article. This one is pretty simple but that’s okay. So long as it’s sharing some knowledge and I managed to get an article out on schedule, it’s all good by me. This time, you’ve learned how to navigate to the start of end of the line – in the terminal and without taking your eyes off the screen.
You might as well memorize the shortcuts as they appear to be pretty universal from my testing. They’ll likely be faster for you than any of the other methods, so they’re worth learning and adding to your growing toolbox of Linux tools. Ideally, my ailments will go away soon… I’m hopeful…
Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.
Last Updated on December 7, 2023 by KGIII
You are correct. I did not know that.