Bash keyboard shortcuts that use Alt do not work on a Mac

Solution 1:

Default OS X Terminal emulator? Then ‘Settings’ → ‘Keyboard’ → “Use option as meta key”.

Solution 2:

As the bash manual page describes:

On keyboards without a meta key, M-x means ESC x, i.e., press the Escape key then the x key. This makes ESC the meta prefix.

[...]

forward-char (C-f) Move forward a character.

backward-char (C-b) Move back a character.

forward-word (M-f) Move forward to the end of the next word. Words are composed of alphanumeric characters (letters and digits).

backward-word (M-b) Move back to the start of the current or previous word. Words are composed of alphanumeric characters (letters and digits).

So indeed, Esc followed by B moves back one word, and holding down Ctrl while pressing B moves back one character. (So, you might like Dmitry's answer better, or to move around words just hold down Option while pressing the left or right cursor key.)

As an aside, as for "On a mac, the option key is the alt key (or at least it's supposed to be)": OS X doesn't use any Alt key. The only reason that label is printed on that key, is to help you when you're using a Mac with some other operating system.