Persistent environment variable

shell> export HISTTIMEFORMAT='%F %T ' shell> history | tail -n 2 1006 2010-01-16 00:55:47 export HISTTIMEFORMAT='%F %T ' 1007 2010-01-16 00:55:49 history | tail -n 2 

This will continue as long as the environment variable is set, so if I log out, you will need to set it again. How to make it permanent?

+4
source share
1 answer

Add it to your ~/.bashrc and ~/.bash_profile - one of them will be read when bash starts. .bash_profile is read when you log in, .bashrc is read when you create a new interactive shell without logging in (for example, opening a terminal window from X).

+3
source

Source: https://habr.com/ru/post/1344738/


All Articles