2 min read

Terminal shortcuts

The following is a short one, but if you’re not familiar with Terminal usage, you will find this entry oddly comforting. The Terminal window may be scary at first and believe me, terrible things could happen if you are sloppy. But you have this tutorial. So you will be more or less fine.

Again trivial but useful keyboard combinations to save you some time.

CTRL and T, will open the Terminal

CTRL and SHIFT and T, will open a new tab

CTRL and N, will open a new Terminal window

CTRL +, will increase the font size

CTRL -, will decrease the font size

Arrow-up, will rescue the last written commands (useful with typos)

CTRL and A, will set you at the beginning of the command

CTRL and E, will set you at the end of the command

CTRL and Left-arrow, will left-jump between arguments

CTRL and Right-arrow, will right-jump between arguments

CTRL and U, will clear the entire command written

CTRL and C, will force terminal shut-down (use it carefully)

Extra tip. The (drum rolling) TAB key.

If while typing a file name, you feel like pressing the TAB key, go ahead. You’ll be surprised that the name of the file you are struggling to correctly type will fill automatically. This one will prevent you from fat-finger typos.

NOTE: if two files are named very alike (e.g., subj0001.nii.gz and subj0002.nii.gz), pressing the TAB key after typing “s” will stop at “subj000”.

Why? because two potential candidates (i.e., subj0001.nii.gz and subj0002.nii.gz) have been found. Therefore, if you are interested in subj0001.nii.gz, then type “1” (i.e., subj0001) and TAB again to complete the rest.