Last command to view all login information
1. View current login user information
Who commands:
Who default output includes user name, terminal type, landing date and remote host.
who /var/log/wtmp
You can see every landing since the wtmp file was created.
(1)-b: View the last time the system was launched
(2)-H: Print the title of each column
Ours command:
Prints the current login user, each of which displays a user name for one landing session.
2. View command history
Each user has a history of commands.
View $HOME/.bash_history
Or enter at the terminal: history
Three, last command.
View user login history
This command reads the /var/log/wtmp file; /var/log/btmp displays remote landing information.
Last default prints all users’ landing information.
If you want to print a user’s landing information, use it.
Last username
Options:
(1)-x: display system switches and performance level information
(2)-a: Show landingip in the last line
(3)-f: Read a specific file with options -f / var/log/btmp
(4)-d: Convert IP address to host name
(5)-n: Set the number of columns shown on the list
(6)-t: See user login history at specified time
For example:
last -t 20150226160404
Show the landing history before this time stamp
4, lastlog command
View the last login history of all users
Command will read/ var/log/lastlog files; user sequence follows the order in/etc/passwd
Options:
(1)-u: View the last login history of a user
For example: lastlog-u test
View login history of user test
(2) -t: View user login history in the last few days
Example: lastlog -t1
Check the landing history in the last day
(3) -b: View user login history before the specified number of days
For example: lastlog-b60
View user login history 60 days ago
5. ac Order
Default output reporting total time according to the time of connection (hours) between landing and exit times in/var/log/wtmp file
(1)-p: Shows each user ‘ s connection time
(2)-d: Show daily connection times
(3)-y: the year shown, and –d used in conjunction
未经允许不得转载:萌萌Apprentissage » Linux view user login information
linux One Chinese script
Google shell enable enhanced mode 4 nuclear 16G RAM
Tmux use tutorial
Screen's summary
I'm gonna get you a new one, shell.cloud.google on the line.
Linux Memory Clearing