use of uptime command in Linux

Home / bash / Use of uptime command in Linux/ Mac OS
Published on April 2, 2025
Updated on August 11, 2026
2 min read

problem

You wish to see for how long your computer system is up and running (since powering up). This is for Linux, Mac OS, etc.

SOLUTION

Use of uptime command. In terminal write the following command:

				
					uptime
				
			
output
uptime command in Mac OS

The uptime commands shows the following:

  • the current time, 17:17
  • The duration of how long it’s been up and running, i.e for 5 hours and 30 minutes
  • It shows the number of users, i.e.  2 users.
  • Lastly, it shows the average load in the last 1, 5 and 15 minutes.
Let’s restart the system and have tea.

Running the command again

				
					uptime
				
			
output
uptime command in Mac OS after restart

Now it’s showing up for 9 minutes.

conclusion

In this post we saw a simple command to use in the terminal to see for how long the system has been up since last shutdown or restart.

Share it!

Facebook
Twitter
LinkedIn
Reddit
Picture of Ellion

Ellion

Professional IT consultant, writer, programmer enthusiast interested in all sorts of coding.
Eats all cookies 🍪

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
0
Would love your thoughts, please comment.x
()
x