When Octave starts it looks for commands to execute from the following files:
octave-home/share/octave/site/m/startup/octaverc
/usr/local
). This file is
provided so that changes to the default Octave environment can be made
globally for all users at your site for all versions of Octave you have
installed. Some care should be taken when making changes to this file
since all users of Octave at your site will be affected.
octave-home/share/octave/
version/m/startup/octaverc
/usr/local
) and version
is the version number of Octave. This file is provided so that changes
to the default Octave environment can be made globally for all users for
a particular version of Octave. Some care should be taken when making
changes to this file since all users of Octave at your site will be
affected.
~/.octaverc
.octaverc
~/.octaverc
. Any use of the cd
command in the ~/.octaverc
file will affect the directory that
Octave searches for the file .octaverc
.
If you start Octave in your home directory commands from from the file
~/.octaverc
will only be executed once.
A message will be displayed as each of the startup files is read if you
invoke Octave with the --verbose
option but without the
--silent
option.
Startup files may contain any valid Octave commands including function definitions.