Linuxhistory time user IP settings

Source: Internet
Author: User
During the Linuxhistory time, the user's IP settings encountered some unknown operations when using the linux server. google said that the history command can view historical records. after using this command, we found that it was not detailed enough, then google, you can set the display of history by yourself ....
During Linux history time, the user's IP address settings encountered some unknown operations when using the linux server. google said that the history command can be used to view historical records. after using the history command, I found that it was not detailed enough, google, you can set the display of history on your own. Record the setting process for system replacement. use the vi editor to open/etc/profile2. add two code codes: USER_IP = 'who-u am I 2>/dev/null | awk '{print $ NF}' | sed- e's/[()] // g'' www.2cto.com export HISTTIMEFORMAT = "[% F % T] ['whoam'] [$ {USER_IP}]" 3. source/etc/profile4. execute history to display the following: 1000 [04:05:09] [root] [192.168.10.136] history 1001 [2012-09-08 04:14:24] [root] [192.168.10.136] cd root 1002 [04:14:27] [root] [192.168.10.136] ls 1003 [2012-09-08] 04:14:30] [root] [192.168.10.136] cd/opt
 
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.