this post was submitted on 27 Dec 2025
52 points (96.4% liked)
Linux
60459 readers
652 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 6 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Relies on Systemd.
~~Edit: try
uptime. Or, Linux only,/proc/uptime.~~Editedit:
uptimeis for uptime. For last login islast -n1or "logged in since " islast -s <time>.Oh no, now it will be compatible only with most of the distros out there.
Only Linux distros. Which is, why i mentioned it. ~~uptime~~
lastworks on BSD's and not-Systemd's too.Fair point, maybe in future consider adding more value to your initial comment, especially when you are referring to the usual discussion topics. Just stating that it uses systemd will make everyone think you want to start the usual pointless systemd hate nonsense discussion
Ok. But this this is a post in a Linux community. So one might assume it’s targeted towards Linux users.
I discovered it on /all, my bad.
Relies on bash
Relies on awk
Relies on the Gregorian calendar
That was mentioned in the title.
This was meant in jest. It does use systemd, which is also mentioned in the post.
Only in the script.
Well yeah, that's what most people use
Cool. Some don't. Reason enough to mention requirements.
Uptime shows how long the system has been up, not how long one has been interacting with the system.
Oh, right, my bad. But fret not there's
last -n1for that.I don't believe that does the same thing either. What if I lock my computer, sleep it, and step away for the day? I haven't logged out, but my interactive session has ended.
Last shows how long the last user logged in has been logged in. So if your system routinely has multiple users logged in, this may not be a useful metric.
Yawn. Oh no youre using a different init than I would have preferred 🥺🥺🥺😣😭
This is what I picture everytime someone complains about systemd.
Systemd is great and at this point y'all just like being contrarian.
Stop complaining. I just mentioned the requirement because you didn't.
There's a whole cross-compatible command called ~~uptime~~
last, you know?You right I was being mean, sorry.
Does
uptimecount or skip the time a system is in suspend? On mobile, can't check manWhat, the logind thing?
oh the irony