Spiga

Last reboot or shutdown date and time in linux

(Question)

I am a regular Linux user. How can I find the last reboot or shutdown date and time of my system?

(Answer)

AllLinux systems come with a utility called last. This searches back through the file /var/log/wtmp and displays a list of all users logged in since that file was created along with ttys and hosts.

To get the system reboot date and time, try the following command

last reboot | head -1
For shutdown date and time
last -x|grep shutdown | head -1
To get the system boot time you can use the 'who' command as follows:
who -b
This command is also used to see who all are logged on the system.


From Linux For You Magazine (Q and A Section)
Organize by Vipin Sharma from New Horizons India Ltd
Senior Corporate Manager - Technical



Related Posts by Categories



Widget by Hoctro | Jack Book

0 comments:




Earn $$ with WidgetBucks!