An alternative way would be pressing M-. (assuming one is using Readline for typing text in the shell, which is the default for my bash shell).