I'd like to find out how long the system has been running under UNIX or Linux operating system. How do I find out system uptime?
Both Linux and UNIX like systems comes with various command to find out server uptime command. Under Linux file /proc/uptime has uptime information and file /var/run/utmp has information about who is currently logged on. However, information from /proc or utmp file is not directly readable by humans so you need to use the following commands.
UNIX / Linux uptime command
Open a command-line terminal (select Applications > Accessories > Terminal), and then type the following commands:
21:54:11 up 13 days, 4:29, 1 user, load average: 0.21, 0.21, 0.12
The uptime command gives a one line display of the following information.
- The current time (21:54:11)
- How long the system has been running (up 13 days)
- How many users are currently logged on (1 user)
- The system load averages for the past 1, 5, and 15 minutes (0.21, 0.21, 0.12)
This is the same information contained in the header line displayed by the w and top commands:
21:56:06 up 13 days, 4:31, 1 user, load average: 0.03, 0.14, 0.09 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT root pts/0 123.xxx.yy.zzz 21:54 0.00s 0.02s 0.00s vi
Please note that the w command displays who is logged on and what they are doing while top command provides a dynamic real-time view of a running Linux/UNIX/BSD operating systems. TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!
- 30 Cool Open Source Software I Discovered in 2013
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012
- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop