# How to get to the beginning in irb

**URL:** <https://www.ruby-forum.com/t/how-to-get-to-the-beginning-in-irb/137008>\
**Category:** Ruby\
**Created:** [May 8, 2008, 7:35am UTC](https://www.ruby-forum.com/t/how-to-get-to-the-beginning-in-irb/137008 "2008-05-08T07:35:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [May 8, 2008, 7:35am UTC](https://www.ruby-forum.com/t/how-to-get-to-the-beginning-in-irb/137008/1 "2008-05-08T07:35:57Z")

</div>

I am using OSX. I am using terminal and I use irb. After typing  
something I need to do p at the front. Now I need to go back to the  
beginning of the line and I hit left arrow key and it takes forever.

I have seen people jump straight to the beginning of the line. What’s  
the shortcut command and where can I get the list?

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [May 8, 2008, 7:49am UTC](https://www.ruby-forum.com/t/how-to-get-to-the-beginning-in-irb/137008/2 "2008-05-08T07:49:26Z")

</div>

quoth the removed\_email\_address@domain.invalid:

> I am using OSX. I am using terminal and I use irb. After typing  
> something I need to do p at the front. Now I need to go back to the  
> beginning of the line and I hit left arrow key and it takes forever.
> 
> I have seen people jump straight to the beginning of the line. What’s  
> the shortcut command and where can I get the list?

Not sure of a list but ‘home’ and ‘end’ are working for me to get to the  
beginning and end of a line respectively.

-d

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [May 8, 2008, 2:02pm UTC](https://www.ruby-forum.com/t/how-to-get-to-the-beginning-in-irb/137008/3 "2008-05-08T14:02:43Z")

</div>

On May 8, 1:52 am, Joel VanderWerf [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > beginning and end of a line respectively.
> 
> If those don’t work, try Ctl-A and Ctl-E.
> 
> –  
> vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

Awesome.  
ctrl-A and ctl-E worked for me.

Thanks a bunch.

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [May 8, 2008, 7:52am UTC](https://www.ruby-forum.com/t/how-to-get-to-the-beginning-in-irb/137008/4 "2008-05-08T07:52:56Z")

</div>

darren kirby wrote:

> quoth the removed\_email\_address@domain.invalid:
> 
> > I am using OSX. I am using terminal and I use irb. After typing  
> > something I need to do p at the front. Now I need to go back to the  
> > beginning of the line and I hit left arrow key and it takes forever.
> > 
> > I have seen people jump straight to the beginning of the line. What’s  
> > the shortcut command and where can I get the list?
> 
> Not sure of a list but ‘home’ and ‘end’ are working for me to get to the  
> beginning and end of a line respectively.

If those don’t work, try Ctl-A and Ctl-E.
