Normally, Octave is used interactively by running the program `octave' without any arguments. Once started, Octave reads commands from the terminal until you tell it to exit.
You can also specify the name of a file on the command line, and Octave will read and execute the commands from the named file and then exit when it is finished.
You can further control how Octave starts up by using the command-line options described in the next section, and Octave itself can remind you of the options available. Type
octave --help
to display all available options and briefly describe their use (`octave -h' is a shorter equivalent).
--debug
-d
--help
-h
-?
--ignore-init-file
--norc
-f
--info-file filename
--interactive
-i
--path path
-p path
--silent
--quiet
-q
--verbose
-V
--version
-v
--echo-commands
-x
file
When Octave starts, it looks for commands to execute from the following files:
OCTAVE_HOME/lib/octave/VERSION/startup/octaverc
OCTAVE_HOME
is the directory in which all of Octave is
installed (the default is `/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. Some
care should be taken when making changes to this file, since all users
of Octave at your site will be affected.
~/.octaverc
.octaverc
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, it will avoid executing
commands from `~/.octaverc' twice.
A message will be displayed as each of these 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 multiple function definitions.