How to get system uptime in Linux

You can use any of below commands to get uptime in Linux system

$ uptime -p

-p option show uptime in pretty format like up 4 weeks, 1 day, 1 hour, 44 minutes

$ uptime -s

-s option shows system up since, in yyyy-mm-dd HH:MM:SS format like 2019-01-07 03:15:07

You can use uptime command without any parameter, however that will give extra information: The current time, how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes

$ uptime

This will give output as 04:59:32 up 29 days, 1:44, 1 user, load average: 0.46, 0.28, 0.28.