How do you find the uptime of a Linux server?

See all GNU/Linux related FAQ
I am a new Linux system user. I need to find the uptime of a Linux server located in AWS cloud. How do I check Linux system uptime?

Linux command ship with various command line tools to find out server uptime command. File /proc/uptime has uptime information, and file /var/run/utmp has information about who is currently logged on. However, data from /proc/uptime or /var/run/utmp file is not directly readable by humans, so you need to use the following commands.
Tutorial details
Difficulty level Easy
Root privileges No
Requirements Linux terminal
Category System Management
OS compatibility AlmaLinux Alpine Arch CentOS Debian Fedora Linux Mint openSUSE Pop!_OS RHEL Rocky Stream SUSE Ubuntu WSL
Est. reading time 3 minutes

Command to find the uptime of a Linux server

To find the uptime of a Linux server use any one of the following command. First, open the terminal window and then type:

  1. uptime command – Tell how long the Linux system has been running
  2. w command – Show who is logged on and what they are doing including the uptime of a Linux box
  3. top command – Display Linux server processes and display system Uptime in Linux too.

Let us see examples.

How to check system uptime in Linux

Open the terminal application on Linux and type the following uptime command:
$ uptime

Commands to find the uptime of a Linux server

My Linux system is running from last 13 days

The uptime command gives a one line display of the following information.

  • The current time – 10:46:56
  • How long the system has been running – up 13 days
  • How many users are currently logged on – 1 user
  • The system load averages for the past 1, 5, and 15 minutes (0.15, 0.08, 0.08)

Show uptime in pretty and human readable format by passing the -p as follows:
$ uptime -p
Sample outputs:

up 1 week, 6 days, 2 hours, 50 minutes

Want to find out the system is up since what time?

Try passing the -s as follows to see information in yyyy-mm-dd HH:MM:SS format:
$ uptime -s
Sample outputs:

2019-05-16 08:13:44

Check Linux system uptime with w command

Run the w command to show information about the users currently on the Linux machine, and their processes. The header shows, in this order, 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. For example, type the following w command:
$ w
How to Check System Uptime in Linux

Display server uptime in Linux using top command

The top command provides a dynamic real-time view of a running system. It can display system summary information as well as a list of processes including system uptime. Open the terminal and run:
$ top
Linux server uptime command


You learned how to use the uptime command that display the current time, the length of time the Linux system has been up, the number of users online, and the load average. For more information, see this page and the following pages using the man command or pass the --help option:
$ man uptime
$ uptime --help
$ man w

See also

  • Linux Server see the historical and statistical uptime of system with tuptime utility

🥺 Was this helpful? Please add a comment to show your appreciation or feedback.

nixCrat Tux Pixel Penguin
Hi! 🤠
I'm Vivek Gite, and I write about Linux, macOS, Unix, IT, programming, infosec, and open source. Subscribe to my RSS feed or email newsletter for updates.

0 comments… add one

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre> for code samples. Your comment will appear only after approval by the site admin.