Equivalent to Alt + dot on terminal [duplicate]

On linux consoles I always use Alt + . to get the last argument of the previous command in history.

for example if I had

ls /tmp/test

as last command, and if I type

rm Alt -

this will result in

rm /tmp/test

On an Apple Terminal, this doesen't work, is there an alternative?


Solution 1:

I found an answer here:

Equivalent to alt-. in terminal

ESC + . inserts the last argument and is the direct equivalent to Alt + . on Linux

see https://apple.stackexchange.com/a/85152/31470