open a terminal, type in a command and I want to go to the beginning of the line and then back to the end of the line. How do you do this?
Hold down the option key and use the left and right arrows.
I've never understood why Apple doesn't have a backspace and a delete button as well as a simple home and end.
They do, on the full size heyboard. Not on the compact keyboard or on laptops, where there isn't room for them. For Home and End, use fn-option-up and down keys. fn-delete will do a delete-right.
Because they don't feel the user needs them, Wrong or right.
Home = Command+Left arrow key
End = Cmd+Right arrow.
P^Pv = Cmd+up/down arrow.
Backspace = fn+delete (sometimes, other times not)
Delete = Delete (sometimes, then not sometimes)
All key combo above, as noted with delete key, work sometimes and most of the time not when you really need it.
It's a Mac and Steve Jobs Knows Best what is good for all users. Just ask him.
Actually, in most cases the Delete key functions like a Backspace key. To delete characters to the right of the cursor, use Fn+Delete. First thing I learned as a former Windows user converting to the Mac way a couple months back.
Yup right Delete = Backspace, forgot for a second.
Delete to the right of cursor, what is normally known as the function of the REAL Delete key, is fn+Delete (Sometimes).
Terminal is not a text editor. It is a tool for running Unix shells. You must follow the conventions determined by your shell and your shell configuration.
A typical configuration in bash uses Control-A for the beginning of the line, and Control-E for the end of the line. This is a bash convention, not set by Apple. However Apple has provided a feature: if you Option-Click anywhere on the line to move the cursor to the clicked point. (Terminal sends the necessary commands to the shell to move the cursor to that point.)
I wish you'd actually go try what you're posting here. Ctrl A and Ctrl E don't work either. I'm also well aware of what terminal is and how to use it. I'm also well aware of keyboards and how to use them. Comments of not putting keys on a keyboard because there is no room is frankly BS because smaller computers have more keys on them than Apple puts. With that being said, whether Apple thinks you ever use Home and End keys doesn't mean people don't. I have people that work with me that refuse to use Apple computers simply because they hate their keyboards and how the leave things out for absolutely no good reason. I'd love to see the actual research where anyone has ever concluded you didn't need those keys.
Sorry, I just get tired of hearing excuses for lame decisions made by Apple. I live in the terminal and I make mistakes and need a quick way to jump back and forth on the command line. Every single OS out there gives me this ability, EXCEPT APPLE!. I spent almost $3500 buying a new MBPr and accessories and something so basic missing all this time drives me crazy.
Sorry, there are no excuses!
If you are comfortable with the vi or emacs editor, you can set command-line editing with the editor name:
$ set -o vi
Now, up arrow, walks you back up the bash command history tree. When you see a command you want to edit, hit esc to enter view and navigate mode.
i - insert mode
esc - exit insert mode
h - left one char
l - right one char
home - beginning of line
end - end of line
delete - remove char right of cursor
usual vi line commands
If you are at the terminal prompt, Page up will jump a page back in command-line history. Page down moves forward a page.
if your terminal session loses destructive backspace or Ctrl-U destructive line delete, here is a command that still provides fond memories to some us:
$ stty dec
I open a Terminal window, type in history, and home, end, page up, and page down keys work normally. I don't do ssh stuff so can't check your example.
If i'm typing code or recalling past commands using the arrow keys, CNTRL+A goes to the line's beginning and CNTRL+E goes to the line's end. More at http://osxdaily.com/2006/12/19/command-line-keyboard-shortcuts-for-mac-os-x/. If it's not working for you, create a new admin user account, log into it, and try there. You might have some mucked up Terminal prefs.
What else might you be wanting, since I didn't read every entry.
Just to add to this... Control-A and Control-E do in fact work to go to the beginning and ending of the line respectivelly in terminal.app. t's been that way since pretty much the beginning of UNIX shells. Jeffry Jones is correct. Cybercript13, if you lived in the shell, you would know this . At any rate, it might be a nice gesture if you apologized to Jeffry Jones, and retracted your statements about Apple. (you're beginning to sound like "pts").
If you are in a default shell for Terminal.app, this should all work. What keyboard are you using?