The Linux Operating System is loaded up with a few commands which any hopeful Linux master or power user for example system admin should have a decent handle of. One of such commands is uptime and today, I’ll momentarily examine its purpose and syntax.
Uptime Command In Linux: It is used to find out how long the system is active (running). This command returns a set of values that involve, the current time, and the amount of time the system is in running state, the number of users currently logged in to, and the load time for the past 1, 5, and 15 minutes respectively.
Linux Uptime Command With Usage Examples:
uptime uses a simple syntax:
# uptime [option]
Using Uptime
You can run the uptime command with no alternatives like so:
# uptime
It will display an output similar to:
09:10:18 up 106 days, 32 min, 2 users, load average: 0.22, 0.41, 0.32
Arranged by appearance, the command shows the current time as the first entry, up implies that the system is running and it is shown next to the total time for which the system has been running, the user tally (number of logged on users), and in conclusion, the system load averages.
What are system load averages? It is the normal number of processes that are in a runnable or uninterruptable state. An interaction is in a runnable state when it is utilizing the CPU or waiting by to utilize the CPU; while a process is in a uninterruptable state when it is hanging tight for I/O access like waiting for a disk.
Now let’s see some useful uptime command usage with examples.
Check Linux Server Uptime
You can filter uptime’s outcome to show just the running season of the system with the command:
# uptime -p up 58 minutes
Check Linux Server Starting Time
Utilizing option -s
will show the date/time since when the system has been running.
# uptime -s 2021-04-18 11:49:17
Uptime Version & Help
For what it’s worth with most command line applications, you can show uptime’s adaptation data and speedy assistance/help page with the accompanying command.
# uptime -h 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 For more details see uptime(1).
Also Read – Learn Basic Linux System Commands For Linux Foundation Certified IT Associate (LFCA) Certification
That’s all, In this article, we have explained Linux Uptime Command With Usage Examples. I hope you enjoy this article. If you like this article, then just share it and then do subscribe to email alerts for Linux, Windows, macOS, Android, Internet, Firewall and Security, CCTV tutorials. If you have any questions or doubts about this article, please comment.