Bash History With Timestamps

If you need to see Bash history with timestamps, use this command.

HISTTIMEFORMAT="%d/%m/%y %T "

To make it permanent, add it to your .bashrc.

echo 'HISTTIMEFORMAT="%d/%m/%y %T "' >> ~/.bashrc
source ~/.bashrc

Timestamps accuracy is retroactively, meaning it will not be accurate for commands performed prior to the history time format being set.

Set User Umask

How to set up umask for a Linux user.

# sets umask for all users
vi /etc/profile
# sets umask for a user
vi ~/.bashrc

Add the following umask line to the file.

umask 0022