Environment Variables location
System environment variables Location: / etc / profile
User environment variables Location: / home / usr
Modify the command history
Command history mechanism Shell environment to provide users with a great convenience, but it also poses a potential risk to the user. As long as access to the user's command history file, the user's command operation will glance, it is necessary to command history is automatically logged out.
bash terminal environment, the command history is recorded as 1000. HISTSIZE controlled variable, by modifying the / etc / profile file HSITSIZE variable values, can affect all users of the system.
First, check the current command history
The figure above shows the six command history
The system configuration file / etc / profile
Configuration, display the history verification
If no command history records, you can change the value to 0, but command history will have user-friendly operation, so the operation is more efficient to clear the history when you log off, this method is described below.
Control file into the user environment variables
You can write command
Automatic logout
Automatic logout is also set in the environment variable file, the command: export TMOUT =
After a successful automatic logout 30s