Home » Git » Practical examples of uptime command

Practical examples of uptime command

Update on:
Apr 23, 2021

Linux operating system is known as a command-based powerful operating system where a Linux engineer or administrators using several commands for daily activities.

There are several commands you need to perform your daily task and to monitor your operating system’s performance, where uptime is one of them.

The uptime command gives you information about how long your system has been running with the current time, numbers of the user currently login or session opened, and system’s average load for 1, 5, and 15 minutes.

It can also display filtered information by using options.

Syntax of uptime command:
$ uptime [option]

Suggested Reading:

 Linux uptime command Structure

Using uptime Command-

You can use uptime command without any option also like below:

$ uptime

It will gives you output similar to below:

Output:

07:33:49 up 452 days, 16:25, 2 users, load average: 0.71, 3.03, 3.43

In the above output, the command displays the current time first, “up” means the current system is running and it show next to the total time, next shows the user count (logged in users), and in last it shows system load average.

To know more about uptime command’s syntax and option check out here – Linux uptime command.

Now we can discuss some of the useful uptime command usages with examples:

Check Linux Server Starting Time

You can use the “-s” option to display the date and time when the system has been running.

$ uptime -s

Output:

2020-04-27 15:08:19

Check Linux Server uptime

You can use the “-p” option to filter uptime’s output to show only the running time of the system.

$ uptime -p

Output:

git version 2.22.0

Check uptime installed version

you can check your installed uptime tool version by using the “-V” option

$ uptime -V

Output:

uptime from procps-ng 3.3.10

Information about uptime command

You can also check the detailed information about uptime command and available options of uptime command by using the “-h” option

$ uptime -h

Output:

Usage: 
	uptime [options] 
Options: 
	-p, --pretty show uptime in pretty format 
	-h, --help display this help and exit 
	-s, --since system up since 
	-V, --version output version information and exit

Conclusion

The uptime command use to get the information about the current time, online users, how long system has been running and up, and the system load average.

If you have any feedback or question, feel free to leave a comment.

Related Posts

The 30 most useful Linux commands

This article will introduce some practical and common Linux or Unix command , which is the Linux system administrators normally use the command . This article is not a complete list, but a brief list of commands that can be useful...

15 Practical examples of tcpdump command

15 Practical examples of tcpdump command

The tcpdump is the most essential and powerful command-line network packet sniffing tool. We use it to analyze network packets, capture or filter TCP/IP packets that transferred and received over the network on a specific network interface. It is available in almost...

15 Useful “df” Commands to Check Disk Space in Linux

15 Useful “df” Commands to Check Disk Space in Linux

There are several Linux tools available on the internet to check disk space utilization; we can use any of them. But, Linux has a best built-in command-line utility called “df”. The “df” is the short form of “disk filesystem”, we can get detailed information on used...

15 Practical examples of echo command

15 Practical examples of echo command

If you are writing a bash script, you know echo command very well. It is use to display text lines on an output screen or a file. The echo command is the most common command used by all Linux users, and it is built-in Linux command. echo command syntax: echo...

Follow Us

Our Communities

More on Linux Command

The Ultimate Managed Hosting Platform
Load WordPress Sites in as fast as 37ms!

0 Comments

0 Comments

Submit a Comment

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

three × two =

Shares