On Linux systems, including Ubuntu the uptime command gives a one-line display of how long a system has been running as well as logged-in users, system loads and current time. If you’re a student or new user looking for a Linux system to start learning on, the easiest place to start is Ubuntu Linux OS. It’s a great Linux operating system for beginners and folks looking for easier Linux distribution to use. Ubuntu is an open-source Linux operating system that runs on desktops, laptops, servers, and other devices. About uptime command: The uptime command gives you a one-line display of how long a system has been running as well as who is logged in to the system, system loads for the past 1, 5, and 15 minutes and current time. Syntax: The syntax is the rule and format of how the uptime command can be used. These syntax options can be reordered, but a straight format must be followed.,. Below is an example syntax of how to use the uptime command. Options: The command line options are switches or flags that determined how the commands are executed or controlled. they modify the behavior of the commands. they are separated by spaces and followed after the commands. Below are some options for the uptime command: The uptime command uses the /var/run/utmp file to display information about who is currently logged on. It uses the /proc directory to display information about system processes. Simply run the uptime command to invoke it. For example, when you run the uptime command, it shows a similar line as shown below: Details:
14:26:07: Current time of the system which translates to 2:26 PM up 500 days: The system has been up for 500 days 1 user: 1 user is logged in to the system load average: system load average
The update command is simple but useful if you need quick information about how long a system has been running since the last reboot. Conclusion: This post shows you how to use the uptime command on Ubuntu to display brief information on how long a system has been running since the last reboot. If you find any error above, please comment below to alert us.