LinuxWindows

Where Is the Octave Startup File?

Octave reads ~/.octaverc for personal startup and .octaverc in the project dir. Site wide files live with the install.

Last updated

Octave reads up to four startup files in fixed order: site init, version init, personal home octaverc, then project .octaverc in the launch directory. Each may hold any valid Octave commands, and verbose startup prints each as it loads.

The personal file is the daily driver. Path tweaks, pkg loads, and defaults belong there. Environment overrides exist for the site files, so admins can relocate globals without editing installs. Verbose startup prints each file as it loads for debugging.

Where GNU Octave stores this, by platform

Linux
/home/<username>/.octaverc

Personal startup file. Preferred spot for paths, defaults, and package loads. Runs once per session.

Linux
./.octaverc

Project startup in the launch directory. Runs after the home file. Starting in home avoids double execution.

Windows
C:\Users\<username>\.octaverc

Same home file layout on Windows builds. Site files instead live under the install prefix.

Frequently asked questions

How do I keep custom paths across sessions?

Add addpath lines to home octaverc. savepath without a filename writes there too, restoring paths on every launch.

Can I have per project Octave settings?

Drop a .octaverc in the project folder. It runs after the home file, so project settings win without touching globals.

Notice an outdated path? Let us know.