Macaulay2 is available from our web page Macaulay2.com. There you will find installation instructions for MacOSX and several Linux distributions, as well as precompiled versions for various other systems.
For developers, detailed information about building Macaulay2 from source is available on our GitHub repository at https://github.com/Macaulay2/M2/wiki.
Once Macaulay2 is installed on your system, use the information here to set up the Emacs interface (the recommended way to run Macaulay2), bookmark the html documentation, and start your first Macaulay2 session.
At a command prompt in a terminal window, type M2. If Macaulay2 has been installed correctly on your machine, you should see a prompt such as this:
|
If this is the first time Macaulay2 runs on this machine, it creates an application directory under .Macaulay2 in your home directory on Unix-based systems, or under 'Library/Application Support/Macaulay2' under MacOS-based systems. Inside this directory there are several files of interest, including:
If instead you see an error, or if the version printed is too older than the version above, then see the following pages for help and come back to this page.
Macaulay2 stores links to a local copy of the Macaulay2 documentation, as well as any packages you have installed locally, in the file index.html. At the Macaulay2 prompt type viewHelp and press Enter to open index.html in your default web browser. This is a good time to bookmark this page in your browser. Note that there are several different ways of reading the documentation.
At this point you should try something simple in Macaulay2, such as
|
|
|
Macaulay2 can be run in this way from the command-line, but it is generally much more convenient to run Macaulay2 inside a program such as Emacs or TeXmacs. This is because you can more easily view larger objects, use tab-completion, cut and paste, search, save your session, and so on. There is a nice major mode for running Macaulay2 inside Emacs.
Regardless of how you use Macaulay2, you can start a new session by entering restart, or terminate it by entering exit, quit, end, or your end of file character (which is Ctrl-D under most systems). If Macaulay2 is reading and running a script, the end of file will terminate the program.
See the Macaulay2 wiki for links to extensions for other popular editors that at least support syntax highlighting for Macaulay2 files.
Once you are set up, it is time for a first Macaulay2 session.
The source of this document is in Macaulay2Doc/ov_getting_started.m2:162:0.