Linux uptime Command Examples

Filed Under: UNIX/Linux

Linux uptime command shows us how long the system has been running. The uptime command gives a one-line description of information containing the current time, how long the system is running, the total number of logged-in users, and the system load. In this article, we will go through the details of the uptime command with some guidance on how to use it.

This command is useful if you have just started using Linux servers. It can help you to check the load and uptime of your server to keep it running during peak hours.

How to use Linux uptime Command

We can run the uptime command by simply opening up the terminal window and typing uptime.

  • After hitting enter, the first information it gives is the current time of the system.
  • Then it shows for how long the system has been running.
  • After that, the number of logged in users is shown.
  • Finally, the average load of the system for past 1, 5 and 15 minute(s) duration is displayed.

Linux uptime command syntax and usage

uptime [options]

This is how it should look.

Linux uptime Command

Linux uptime Command

Options available for uptime command

To check the options which are available, type uptime --help or uptime --h and hit enter. It shows information about what are the available options and how to use them. Now let us get in-detail with each of the options.

Command options

  • -p: Pretty.
  • -s: Since.
  • -V: Version.
  • -h: Help.

How to use uptime command options?

  1. uptime -p: Here the ‘p’ stands for pretty, this gives the system uptime in human-readable word format. Here is an image showing you how it looks.
  2. Uptime -p Command

    uptime -p Command

  3. uptime -s: In this command option, ‘s’ stands for since. This command option shows since when the system is active, the information output displays date followed by the time the system has been running.
  4. Uptime -s Command

    Linux Uptime -s Command

  5. uptime -V: To know about the version information, make note that the v here is not lowercase but uppercase. This command option gives detail about the uptime command version.
  6. Linux Uptime -V Command

    Linux Uptime -V Command

  7. uptime -h: This is the command option which we previously used to know about the available options. This command option is called as help option, h stands for help.
  8. Uptime H Command

    Linux uptime -h Command

Conclusion

Linux uptime command is a quick way to get trivial information about the system. It quickly shows us how long the system has been running. We also get information about the load average and the number of logged-in users. If you are looking for its man page, then you can find it here. I hope this article helps you to use the uptime command in your daily routine with Linux.

Leave a Reply

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

close
Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages