frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Does root have to be uid 0? Does uid 0 have to be root?

2•axismundi•51m ago
what's so special about root/0?

Comments

gryfft•28m ago
The short answer is that it's a very, very longstanding convention that would be a nightmare to change and wouldn't provide any benefits. It's hardcoded into the kernel and who knows what other programs will always assume UID 0 -> root.

There's some further reading on Stack Exchange. [1]

1. https://superuser.com/questions/626843/does-the-root-account...

RiverCrochet•21m ago
My theory:

UNIX was developed originally on a DEC PDP-7.

I'm not a PDP-7 assembly language expert but there's many instructions that take action if the accumulator is 0. So if a specific UID value has to be special, it's probably easiest and fastest for that value to be 0.

https://dn710100.ca.archive.org/0/items/bitsavers_decpdp7PDP...

For newer CPUs, though (which I am familar with):

Many other CPU architectures have a "Z flag." This is a bit in a status register that's set if the last value encountered is a zero. So you can do something like this:

    LOAD_ACCUMULATOR uid_value
    BRANCH_IF_EQUAL somewhere
The BRANCH_IF_EQUAL instruction (actually BEQ in a few instruction sets) typically branches if that Z flag in the status register is zero. Some instructions on some CPUs reference the Z flag for what it is directly, like DJNZ on Z80 and I think x86 (Decrement and Jump if Not Zero).

If you want to test if a value is something other than zero, then you have to do this:

    LOAD_ACCUMULATOR uid_value
    COMPARE_ACCUMULATOR something
    BRANCH_IF_EQUAL somewhere
The COMPARE_ACCUMULATOR instruction (actually CMP in 6502 and similar in other instruction sets) subtracts "something" from the current value of the accumulator, but doesn't save the result, BUT sets the flags, including that important Z flag.

So it takes more instructions on many CPU architectures if the special value is not zero. This isn't limited to root being UID zero, it's also why "end of string" is zero and zero is a sentinel value in general.

Show HN: LibreOffice-rs – I built a pure-Rust LibreOffice using autoresearch

https://github.com/clark-labs-inc/libreoffice-rs
1•stan_kirdey•20s ago•0 comments

The AI economy is rewriting the American Dream; and blue-collar is poised to win

https://www.cnbc.com/2026/05/19/ai-hiring-slowdown-skilled-trade-workers.html
1•indigodaddy•20s ago•0 comments

Google I/O

https://io.google/2026/
1•thanhhaimai•26s ago•0 comments

The New Workspace: A First-Principle Exploration of Dictation, Agents and Humans

https://www.inferterra.com/the-new-workspace-a-first-principles-exploration-of-dictation-agents-a...
1•matt_teresi•59s ago•1 comments

Confuse some SSH bots and make botters block you

https://ai.realhackers.org/confuse-some-ssh-bots.html
1•Bender•1m ago•0 comments

Raindrop Workshop: Your local OSS agent debugger

https://github.com/raindrop-ai/workshop
1•jamest•1m ago•0 comments

Show HN: Ait – Claude, Codex, and Aider as a team, on your laptop

https://github.com/m24927605/ait
1•m24927605•2m ago•1 comments

Google Flow Beta for Android

https://play.google.com/store/apps/details?id=com.google.android.apps.labs.whisk&hl=en_US
2•julianpye•5m ago•0 comments

A 1955 Los Alamos computer experiment changed our understanding of chaos

https://www.lanl.gov/media/publications/1663/science-of-unpredictability
1•LAsteNERD•6m ago•1 comments

Google IO 26 Keynote

https://www.youtube.com/watch?v=wYSncx9zLIU
3•Dinux•8m ago•0 comments

Polymarket debuts prediction markets tied to private companies

https://www.reuters.com/legal/government/polymarket-debuts-prediction-markets-tied-private-compan...
1•thm•9m ago•0 comments

Political Money Is Flowing to Influencers. But from Whom?

https://www.nytimes.com/2026/05/16/business/media/influencers-political-financing-disclosure.html
1•thm•10m ago•0 comments

Drone Swarms: Uncomfortably Plausible

https://silencingmachine.org/posts/0004-its-not-the-terminator-its-worse/
1•jaybill•10m ago•0 comments

Ask HN: Reliability Issues with AWS

2•yonisto•10m ago•0 comments

We made our sandbox filesystem 47× faster by deleting it

https://microsandbox.dev/blog/block-backed-rootfs
3•makeboss•10m ago•0 comments

Vendergood: Reconstructing a 1905 constructed language for AI agent cognition

https://github.com/mekickdemons-creator/libro-vendergood
1•Mekickdemons•11m ago•1 comments

Together, Edera and Minimus Claim They Can Protect Your Software from AI Hackers

https://cloudnativenow.com/features/together-edera-and-minimus-claim-they-can-protect-your-softwa...
1•CrankyBear•11m ago•0 comments

What's Easy Now? What's Hard Now?

https://brooker.co.za/blog/2026/05/18/whats-easy-whats-hard.html
2•KraftyOne•12m ago•0 comments

Bill C-22 Surveils Ordinary Canadians While Leaving Cartel Networks Untouched

https://www.thebureau.news/p/bill-c-22-surveils-ordinary-canadians
1•laurex•12m ago•0 comments

xs

https://cryptm.org/xs/
1•tosh•13m ago•0 comments

Anyone else been seeing any Google branding changes today?

1•dragonsenseiguy•14m ago•0 comments

Show HN: Agent threads – Share Claude Code and Codex sessions as public links

https://agent-thread.com
1•pixxxel•15m ago•0 comments

Dynamic Filters: 25x Faster Queries by Passing Info Between Operators

https://datafusion.apache.org/blog/2025/09/10/dynamic-filters/
1•killme2008•15m ago•0 comments

Trump Mobile Phone Is Finally Released–With a Major Blunder

https://www.thedailybeast.com/trump-mobile-phone-is-finally-releasedwith-a-major-blunder/
2•cf100clunk•15m ago•1 comments

Show HN: Pack.sh – Self-host single-file apps

https://pack.sh/
1•gkiely•15m ago•1 comments

Minnesota passes the nation's first ban on 'nudification' apps

https://19thnews.org/2026/04/minnesota-nudification-ban-ai-deepfake/
4•laurex•15m ago•0 comments

Click your location and this map will generate an efficient 5-bar pub crawl

https://mapsmania.github.io/geocoder/pubcrawlr.html
1•mikelgan•17m ago•2 comments

Human newborns form musical predictions based on rhythmic, not melodic structure

https://journals.plos.org/plosbiology/article?id=10.1371%2Fjournal.pbio.3003600&utm_source=clivet...
1•bookofjoe•18m ago•0 comments

You've Graduated. Now What?

https://www.adpresearch.com/research/2026-youve-graduated-now-what
1•lwhsiao•18m ago•0 comments

Chicago vs. New York Pizza Is the Wrong Argument

https://www.hillelwayne.com/post/pizza/
2•ethanhawksley•18m ago•1 comments