Here is few command for getting history in ubuntu terminal.
history Output: 483 cat /etc/nginx/nginx.conf 487 clear 488 history 490 which sh 496 history 10
This will output like this. First part is the process ID and second part is command.
Get only last 10 history
Search for history:
history | grep nginx Output: 483 cat /etc/nginx/nginx.conf
Running Previous Commands:
!483 Output: 483 cat /etc/nginx/nginx.conf
Hope this will help you to save time.
Happy coding 🙂