Edit the shell environment configuration file (for example , to configure bash, add to the ~/.bashrc file):

export PS1="[\d \t \u@\h:\w ] $ "                                                                                # shows date, time, host and current directory in your prompt
HISTTIMEFORMAT="%d/%m/%y %T "                                                                                    # adds timestamps to your history

Alternatively, gather this information by running commands: