Can you fake * nix uptime?

Just curious if you can fake uptime , for example, increase it to 10 years?

I tried changing the system time and it won’t do this trick.

+8
linux unix macos uptime
source share
3 answers

Check out this utility: UptimeFaker .

+6
source share
 alias uptime='echo " 11:07:17 up 10 BILLION YEARS!, 4 users, load average: 0.38, 0.52, 0.41"' 

If you want extra fantasy, you can get the actual output of time and change it.

+6
source share

Yes, you should be able to connect gdb to a running kernel and crack uptime. You need to know where it is stored and have a character file. I assume that uptime is kept in something static distribution.

As an alternative, write a small kernel module that breaks in uptime when it loads (and immediately unloads).

+4
source share

All Articles