BASH (Bourne Again SHell) is the default command line shell used in Ubuntu and Kubuntu and many other Linux distributions. BASH allows you view and manipulate the command line history.
The following examples are from Kubuntu Konsole
List History
user@hostname:~$ history 1 sudo restart 2 sudo restart --help 3 reboot 4 sudo reboot . .. ... 709 history user@hostname:~$
List last 10 lines of history
user@hostname:~$ history 10 700 dmesg | less | grep error 701 sudo nano /etc/modprobe.d/alsa-base.conf 702 history 703 ls 704 cd Annex 705 cd Annex 1 706 cd Music 707 cd ..