


How to check the uptime of a Linux server
Sep 30, 2025 am 02:26 AMUse the uptime command to directly view the system running time, displaying the current time, running time, number of users and load; 2. Get the running time in seconds through cat /proc/uptime to facilitate script processing; 3. The top and w commands display uptime information in the head, which is suitable for monitoring other system status at the same time.
To check the uptime of a Linux server, you can use built-in commands that provide system runtime information. The most common and straightforward way is using the uptime command.
Using the uptime Command
Open a terminal or connect via SSH to your Linux server and type:
uptimeThis displays how long the system has been running, along with the current time, number of users, and system load averages for the past 1, 5, and 15 minutes. Example output:
14:32:10 up 10 days, 3:15, 1 user, load average: 0.15, 0.10, 0.05Check Uptime via /proc/uptime
The /proc/uptime file contains uptime information in seconds. Run:
cat /proc/uptimeOutput example:
867492.12 866103.45The first number is the total number of seconds the system has been running. You can convert this into days by dividing by 86400 (seconds in a day).
Using the top or w Command
Both top and w display uptime in their header line.
- Run top – the first line shows uptime just like the uptime command.
- Run w – it also lists the current time, uptime, user count, and load averages.
These tools are useful when you also want to inspect other system activity like running processes or logged-in users.
Basically, uptime is the quickest method. For scripting or precision values, reading /proc/uptime gives raw data you can process further. All methods are reliable and available on virtually every Linux distribution.
The above is the detailed content of How to check the uptime of a Linux server. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

ArtGPT
AI image generator for creative art from text prompts.

Stock Market GPT
AI powered investment research for smarter decisions

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

The official download portal of Aisi Assistant is located on the official website https://www.i4.cn/, and provides computer and mobile downloads, supporting device management, application installation, mode switching, screen projection and file management functions.

The latest news on September 18th, Huawei HarmonyOS6 has launched multiple rounds of preview version push for developers, and has recently opened the experience qualification to some users who have tried it out for the first time. According to user feedback, the current system name no longer displays the "NEXT" suffix, and it is officially renamed to HarmonyOS6.0. Huawei initially proposed the name HarmonyOSNEXT for the first time at the developer conference in August 2023, aiming to mark the Hongmeng system entering a new stage of development and realizing true native self-development. HarmonyOSNEXT's most core breakthrough is to completely adopt the underlying system architecture developed independently, completely remove the Linux kernel and Android AOSP code, and only run applications based on the HarmonyOS kernel.

TorunWindowsprogramsonLinux,trythesemethods:1.UseWinetodirectlyrun.exefiles.2.InstallPlayOnLinuxforeasierWinemanagement.3.SetupaWindowsvirtualmachinewithVirtualBox.4.UseLutristoinstallandrunWindowsgamesseamlessly.

Tolocateaprogram'sinstallationpathonLinux,use:1.whichprogram_nameforquickPATH-basedlookup.2.whereisprogram_nametofindbinaries,manpages,andsources.3.locatewithupdatedbandgrepforfastfilesearches.4.find/-typef-executable-name"program_name"fort

UseGUItoolslikeStartupApplicationsinGNOME,AutostartinKDE,orSessionandStartupinXfcetomanageloginprograms.2.Manuallyaddstartupentriesvia.desktopfilesin~/.config/autostart/followingXDGstandards.3.Forsystem-levelservices,usesystemctlenable/disabletocontr

TotakescreenshotsonLinux:1.UsePrtScnkeyforfullscreen,Alt PrtScnforactivewindow.2.UseGNOMEScreenshottoolformoreoptions.3.Usegnome-screenshotcommandinterminal.4.Installandusescrotforlightweightcommand-linecapturing.

ToinstallVSCodeonLinux,usetheofficialAPTrepositoryforautomaticupdates,Snapforcross-distributioncompatibility,oramanualtarballforfullcontrol.Choosebasedonyoursystemandneeds.

TocheckdiskspaceonLinux,usedf-hforanoverviewofstorage,du-shtofinddirectorysizes,lsblktolistblockdevices,orinstallncduforaninteractiveanalysis.Thesetoolshelpmonitorandmanagediskusageefficiently.
