Linux uptime command will show how long the system has been running. But if you want to find out the boot time of the system instead, you will have to perform a bit of arithmetic – subtract the output of the uptime command from the current time. Sounds too troublesome? There’s an easier way to do it using the Linux proc filesystem.
In the file /proc/stat, there is a special entry ‘btime’ which is the system boot time expressed in number of seconds since epoch (1-Jan-1970). We can convert the ‘btime’ to a human-readable date format by using the date command.
admin@router01:/# cat /proc/stat | grep btime btime 1381141952 admin@router01:/# date --date="@<code>cat /proc/stat | grep btime | cut -f 2 -d' '</code>" Mon Oct 7 18:32:32 GMT 2013
If you are wondering, the above is the output from my Linux powered WiFi router!