Command history can be found
/~.bash_history. Make sure to check variant for other such as zsh, fish, etc.
history command can be used.
PowerShell command history can be found in :
You can also try
Get-History | Format-List -Property *