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.
Table of Contents
How to use Linux uptime Command
We can run the uptime command by simply opening up the terminal window and typing
- 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
This is how it should look.
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.
- -p: Pretty.
- -s: Since.
- -V: Version.
- -h: Help.
How to use uptime command options?
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.
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.
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.
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.
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.