When using your computer, you can find other users logging on to your computer. If other users use their own names, they can be queried through who. However, if all users log on to the system as root users, they will not be known, so we need to clear them; in addition, if the login user suddenly breaks down, there will certainly be expired login information to be cleared 1, find out the login port; # whorootpts/1Apr800: 06 (172.29.0.29) root
When using your computer, you can find other users logging on to your computer. If other users use their own names, they can be queried through who. However, if all users log on to the system as root users, they will not be known, so we need to clear them; in addition, if the login user suddenly breaks down, there will certainly be expired login information to be cleared
1. find the login port;
# Who
Root pts/1 Apr 8 (172.29.0.29)
Root pts/2 Apr 8 (172.29.0.21)
2. notify the user that he or she is about to close the service:
# Echo "I will close your connection">/dev/pts/2
In this way, the terminal displays this information.
3. close user connection
# Fuser-k/dev/pts/2