9(1)
okay bestie, welcome to 9(1) from the General Commands Manual β the page for running Plan 9 or Unix commands, and it's giving environment-switch main character energy. π
β¨
πΈ NAME πΈ
9, 9.rc, u, u.rc β run Plan 9 or Unix commands. That's the whole name lineup, and yes, it's a little utility polycule. π«Ά
π SYNOPSIS π
9 cmd [ args ... ]
. 9 (from sh(1))
9.rc cmd [ args ... ]
. 9.rc (from rc(1))
u cmd [ args ... ]
. u (from sh(1))
u.rc cmd [ args ... ]
. u.rc (from rc(1))
β¨ DESCRIPTION β¨
β οΈ Heads up bestie: Plan 9 supplies commands with the same name as β but different behavior than β many basic Unix system commands (e.g.,grep,sed,mkdir,rm). Because of that, it is not recommended to run with the Plan 9 bin directory ahead of the system directories. No cap, that's the warning.
9 is a shell script that sets up a Plan 9 environment and runs cmd. It sets $PLAN9 if necessary and adds $PLAN9/bin to the beginning of $PATH before running cmd. Slay, path prepend.
If run with no arguments, 9 does not do anything β literally nothing β so it can be invoked from sh-style shells using . 9 in order to make the current shell start running in the Plan 9 environment. Cute, right? π
9.rc is the same as 9 but written for use by the shell rc(1). Same vibe, different shell bestie.
U and u.rc are the inverse of 9 and 9.rc: they move $PLAN9/bin to the end of the path. It's giving reverse-card energy. π
π EXAMPLES π
Search for greek in the password file:
$ 9 grep '[Ξ±-ΞΆ]' /etc/passwd
Start an rc(1) with the Plan 9 commands in the path before the system commands, and then run the Unix ls:
$ 9 rc
% u ls
π§ SOURCE π§
The files live here, periodt:
/bin/9
/bin/9.rc
/bin/u
/bin/u.rc
π¦ SEE ALSO π¦
intro(1) β that's the whole see-also list, bestie. Go read it if you want the lore. π
π BUGS π
Some shell configurations (notably, oh-my-zsh) define 9 as an alias for cd -9, which makes the 9 command described here inaccessible. In such shells, it is necessary to unalias 9 in your initialization scripts.
π This is the "why is my9not working" jumpscare. Do theunalias 9in your initialization scripts and reclaim your command. π
And that's the footer tea, bestie: this page is 9(1) from the General Commands Manual, with no extra date/version line printed on it β so that's the whole sign-off. Mwah πβ¨
π¦ where this page comes from
- alpine 3.24: plan9port-doc 0_git20260208-r0 Β· LPL-1.02
- arch rolling: plan9port 20261021-2 Β· custom
- nixos 26.05: plan9port 0-unstable-2025-11-10
- nixos 26.05: plan9port-wayland 0-unstable-2025-11-26
- nixpkgs unstable: plan9port 0-unstable-2025-11-10
- nixpkgs unstable: plan9port-wayland 0-unstable-2025-11-26
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms