In this manual: http://www.sagemath.org/doc/tutorial/interactive_shell.html
%hist gives the history of numbered command
However, the sage I use does not seem to have this feature.
Also the outputs in the manual are also numbered. Is there any way to enable this?