You can scroll back to see lines which have scrolled off the top of your shell window with CTRL-PAGEUP and CTRL-PAGEDOWN.
Here's another useful trick with X-Windows copying and pasting: you can pipe output directly into the clipboard with xclip. For example, if you want to e-mail someone a directory listing, do
ls | xclip
then middle-click to paste into your email.
Here are some common keystrokes. Most of these will work at the command line, and in many Linux programs. KDE and Gnome programs may be an exception - their default control key mapping is sometimes closer to Windows. However you can change to Unix Default in the KDE Control Center, under Look & Feel, Key Bindings and in the Gnome Control Center, under Keyboard Shortcuts.
Once you learn these key bindings, you will find that you can work very fast across many different programs. In addition to the key bindings described below, there are the standard arrow keys, page up and page down keys and so on. However the ones described below all lie under your fingers, and so are faster once you learn them.
Table 1. Common editing key bindings
| CTRL-A | Move to the end of the line. |
| CTRL-E | Move to the beginning of the line. |
| CTRL-F | Move forward one character. |
| CTRL-B | Move backward one character. |
| ALT-F | Move forward one word. |
| ALT-B | Move backward one word. |
| CTRL-V | Move one page down. |
| ALT-V | Move one page up. |
| CTRL-D | Delete one character forward. |
| CTRL-H | Delete one character backward. |
| ALT-D | Delete one word forward. |
| CTRL-K | Delete (Kill) everything from the cursor forwards (to the end of the line). |
| CTRL-U | Delete everything from the cursor backwards (to the beginning of the line). |
| CTRL-T | Transpose two characters. |
| ALT-T | Transpose two words. |
| ESC . | Insert the last argument (word) from the previous command. |
Table 2. Common control key bindings
| CTRL-C | Terminate the current program, or sometimes cancel some operation. |
| CTRL-\ | Seriously kill the current program!! Use only after CTRL-C has failed! |
| CTRL-D | End-of-file. This is often used to signal the end of input, or to exit a program. |
| CTRL-G | Cancel the current operation. A VERY useful command to get yourself out of things. |
| CTRL-L | Redraw the console. You will find this one useful on physics, where the new mail notification tends to overwrite whatever you are working on. |
| CTRL-Q | The only time you need this is if you accidently hit CTRL-S. In that case the console is locked until you hit CTRL-Q to unlock it. Apparently once a long long time ago this was actually a useful feature. |
| CTRL-R | Recall command containing characters. After hitting CTRL-R, type the fragment you want to search for. If it returns a command which isn't the one one want, hit CTRL-R again to cycle through matches. |
| CTRL-Z | Suspend the current program and put it in the background. This is very useful once you figure out how it works. Refer to the section on putting jobs in the background. |
You can create and exchange ssh keys to avoid repeatedly typing your password. I will use the example of connection from a machine called berserk to a machine called physics.
On berserk, create an ssh key pair with
ssh-keygen -t dsa
It will prompt you whether you want a pass-phrase or not. If you choose one, you have to type this once per log-in session, but it's rather more secure. It's up to you.
Now copy the .ssh/id_dsa.pub file to physics. From berserk run
scp .ssh/id_dsa.pub userid@physics:tempid
Here we've renamed it tempid. Then on physics run
cat tempid >> .ssh/authorized_keys
This will add the contents of tempid to .ssh/authorized_keys. That's it! Your can now remove the temporary file: rm tempid. Now when you use ssh to login to physics from berserk, you won't be asked for your password!
Of course, you can do all the same steps, interchanging berserk and physics to go the other direction.
If this doesn't work for you, it might be because the permissions on your home directory are too loose. Running the following command on both berserk and physics might help:
chmod -R go-rwx ~
This removes reading, writing and executing permissions from all your files for group and other, leaving only permissions for user (you).