LinuxmacOS

Where Does Oils Store Config and History?

Oils reads one rc file per shell from ~/.config/oils, with history under ~/.local/share/oils.

Last updated

Oils keeps startup deliberately small. Osh sources exactly one file, ~/.config/oils/oshrc. Ysh sources exactly one file, ~/.config/oils/yshrc. Drop in folders with a .d suffix extend each. There is no profile versus rc split to memorize.

History lands under ~/.local/share/oils as osh_history. The docs suggest creating both directories up front, since a fresh install may not make them. Flags override everything per launch, which suits testing a new rc without touching the live one.

Where Oils stores this, by platform

Linux
~/.config/oils/oshrc

Osh startup file. Ysh uses the sibling yshrc. Drop ins live in oshrc.d. History defaults to the XDG share dir oils folder.

macOS
~/.config/oils/oshrc

Same XDG layout as Linux. Symlinking to home dotfiles works when the long config path gets tedious to type.

Frequently asked questions

Do osh and ysh share one rc file?

No. Osh reads oshrc and ysh reads yshrc, and nothing else. Source shared files explicitly from each rc when both shells need them.

How do I start Oils without any rc files?

Pass the rcfile flag with /dev/null or the norc flag. The rcdir flag overrides the startup directory the same way.

Can I keep the old ~/.oshrc path?

Symlink the long path to ~/.oshrc in home. The shell keeps reading the target, so edits work from either name.

Notice an outdated path? Let us know.