Environment variable location
System environment variable location: /etc/profile
User environment variable location: /home/usr
p>
Command history modification
The command history mechanism of the Shell environment provides users with great convenience, but on the other hand, it also brings potential risks to users. . As long as the user’s command history file is obtained, the user’s command operation process will be at a glance, so it is necessary to automatically log out the command history.
In the bash terminal environment, there are 1000 historical commands. Controlled by the variable HISTSIZE, all users in the system can be affected by modifying the value of the HSITSIZE variable in the /etc/profile file.
First check the current history commands
The above figure shows 6 historical commands
Enter the system configuration file /etc/profile
< /p>
Configuration completed, view history Verification
if not required For history command records, just change the value to 0, but there is a command history record that will facilitate user operations, so a more effective operation is to clear the history record when logging out. This method is introduced below.
Enter the user environment variable control file
Write Just order
< strong>Automatic logout
Automatic logout is also set in the environment variable file, command: export TMOUT=
Automatic logout succeeded after 30s
p>