Talk:SECURITY Bash History Functions

From Gentoo Linux Wiki

Jump to: navigation, search

[edit] Using /etc/env.d/ files instead of directly editing /etc/profile

When running env-update the /etc/profile will be modified. To edit /etc/profile the 'gentoo way' i beleive the /etc/env.d/ files should be edited.

Next section is an example:

[edit] Remove bash history duplicates

To avoid having useless duplicates of identical commands in the bash history one can edit /etc/env.d/99histcontrol like this:

File: /etc/env.d/99histcontrol
# Avoid dumplicates in your bash history
HISTCONTROL=ignoredups

Then run env-update and your /etc/profile will contain the new setting.

Personal tools