<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>SageMath</title><revhistory><revision><revnumber>2</revnumber><date>2025-03-24 08:03:34</date><authorinitials>kputyr</authorinitials></revision><revision><revnumber>1</revnumber><date>2023-07-12 07:06:29</date><authorinitials>kputyr</authorinitials></revision></revhistory></articleinfo><section><title>Sage Math</title><para>To start <code>Sage</code> with a <code>Jupyter</code> notebook: type in a terminal </para><screen><![CDATA[> sage '-n jupyter --ip=`hostname`']]></screen><para>This will start <code>Sage</code> on a default compute host. If you want to run it on a specific compute server, type the name of the server first to login to it. For instance, to start <code>Sage</code> on <code>superhost</code> </para><screen><![CDATA[> superhost
> sage -n jupyter --ip=`hostname`]]></screen><para><emphasis>Notice no quotes in this versions of the command!</emphasis> </para><para>The above command should produce an output similar to the one below </para><screen><![CDATA[┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.4, Release Date: 2021-08-22                     │
│ Using Python 3.9.5. Type "help()" for help.                        │
└────────────────────────────────────────────────────────────────────┘
Please wait while the Sage Jupyter Notebook server starts...
[I 09:02:39.440 NotebookApp] Serving notebooks from local directory: /home/b/<your-name>
[I 09:02:39.440 NotebookApp] Jupyter Notebook 6.1.1 is running at:
[I 09:02:39.440 NotebookApp] http://olive:8888/?token=<a-very-long-token>
[I 09:02:39.440 NotebookApp]  or http://127.0.0.1:8888/?token=<a-very-long-token>
[I 09:02:39.440 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 09:02:39.957 NotebookApp] 
    
    To access the notebook, open this file in a browser:
        file:///home/b/<your-name>/.local/share/jupyter/runtime/nbserver-<notebook-id>-open.html
    Or copy and paste one of these URLs:
        http://olive:8888/?token=<a-very-long-token>
     or http://127.0.0.1:8888/?token=<a-very-long-token>]]></screen><para>Open either of the links <code>file:///...</code> or <code>http://olive:8889/...</code> by clicking on it with right button and selecting _Open link_ from the menu. </para><para><emphasis><emphasis role="strong">Note 1</emphasis></emphasis> <emphasis>Do not use <code>http://127.0.0.1:8889/...</code> - this link will not work!</emphasis> </para><para><emphasis><emphasis role="strong">Note 2</emphasis></emphasis> <emphasis>For longer computations please use the second approach with <ulink url="https://wiki.math.uzh.ch/public/screen">screen</ulink>.</emphasis> </para></section></article>