Linux Server Uptime Command To Find Out How Long The System Has Been Running
Both Linux and Unix-like systems comes with various command to find out server uptime command. Under Linux file /proc/uptime has uptime information and file /var/run/utmp has information about who is currently logged on. However, information from /proc or utmp file is not directly readable by humans so you need to use the uptime command.
uptime - Tell how long the system has been running.
UNIX / Linux uptime command
Open a command-line terminal and then type the following commands:
#uptime
Sample outputs:
uptime
12:04:44 up 8 days, 19:42, 3 users, load average: 1.56, 2.56, 1.96
Note: The uptime command gives a one line display of the following information.
1). The current time
2). How long the system has been running
3). How many users are currently logged on
4). The system load averages for the past 1, 5, and 15 minutes
See uptime in pretty format pass the -p option to the uptime command
#uptime -p
Sample outputs:
uptime -p
up 1 week, 1 day, 19 hours, 47 minutes
See uptime in system up since, in yyyy-mm-dd MM:HH:SS format pass the -s option to the uptime command
#uptime -s
uptime -s
2017-12-27 16:22:09
2017-12-27 16:22:09