Friday, October 30, 2020

Practical examples of uptime command

Must read

How to Setup a Firewall with UFW on Ubuntu 20.04

Nowadays, a Firewall is an essential utility and property of any system for security; by default Ubuntu Operating system having a firewall...

How to Install Ruby on Ubuntu 20.04 Linux

Nowadays, Ruby is the most popular language, especially for SaaS application development. It has a perfect and elegant syntax structure, and it...

How to Install Eclipse IDE on Ubuntu 20.04 Linux

Eclipse is the most famous and widely used Java integrated development environment (IDE). It supports many plugins to enhance the capabilities to...

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...
SATISH KUMAR
I am Satish Kumar, Founder of LinuxConcept. Linux and F.O.S.S enthusiast, love to work on open source platform and technologies.
- Advertisement -

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.

- Advertisement -

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
- Advertisement -

It will gives you output similar to below:

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

- Advertisement -

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:

up 1 year, 12 weeks, 4 days, 16 hours, 34 minutes

Check Linux Server uptime

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.

- Advertisement -
- Advertisement -

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Subscribe to our newsletter

To be updated with all the latest news, offers and special announcements.

Latest article

How to Setup a Firewall with UFW on Ubuntu 20.04

Nowadays, a Firewall is an essential utility and property of any system for security; by default Ubuntu Operating system having a firewall...

How to Install Ruby on Ubuntu 20.04 Linux

Nowadays, Ruby is the most popular language, especially for SaaS application development. It has a perfect and elegant syntax structure, and it...

How to Install Eclipse IDE on Ubuntu 20.04 Linux

Eclipse is the most famous and widely used Java integrated development environment (IDE). It supports many plugins to enhance the capabilities to...

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...

How to Reset the MySQL Root Password

Do you want to reset the MySQL root password? Sometimes we forget the root password and not able to log in on...