ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 17 Jul 2019 10:53:41 +0200Running Sage from the commad line in Ubuntu 12.04https://ask.sagemath.org/question/9650/running-sage-from-the-commad-line-in-ubuntu-1204/I'm relatively new to Sage and to GNU/ Linux. Sorry in advance if this question seem silly. But I need to learn how to do this. Here is my problem:
I have Sage installed from source in /usr/local/src. So every time I want to run Sage I have to type on the terminal
$ cd /usr/local/src/sage-5.4.1/
and once inside this directory, I have to type
./sage
How can I start Sage directly at the prompt $ just by typing "sage"?
Thanks a lot for the answer.
Tue, 25 Dec 2012 20:00:15 +0100https://ask.sagemath.org/question/9650/running-sage-from-the-commad-line-in-ubuntu-1204/Answer by ppurka for <p>I'm relatively new to Sage and to GNU/ Linux. Sorry in advance if this question seem silly. But I need to learn how to do this. Here is my problem:</p>
<p>I have Sage installed from source in /usr/local/src. So every time I want to run Sage I have to type on the terminal</p>
<pre><code>$ cd /usr/local/src/sage-5.4.1/
</code></pre>
<p>and once inside this directory, I have to type</p>
<pre><code>./sage
</code></pre>
<p>How can I start Sage directly at the prompt $ just by typing "sage"?</p>
<p>Thanks a lot for the answer.</p>
https://ask.sagemath.org/question/9650/running-sage-from-the-commad-line-in-ubuntu-1204/?answer=14396#post-id-14396Open `$HOME/.bashrc` in a text editor and add the path to the `PATH` environment variable by adding this line to the file
export PATH="/usr/local/src/sage-5.4.1:$PATH"
Save the file and either open a new terminal, or type `exec bash` in the current terminal. Just `sage` should work now. You will need to edit the above line whenever you have a new Sage installation. This is a standard unix way of making things work without giving the absolute path to the commands. Search Google for `unix PATH` to learn more.Tue, 25 Dec 2012 20:11:53 +0100https://ask.sagemath.org/question/9650/running-sage-from-the-commad-line-in-ubuntu-1204/?answer=14396#post-id-14396Comment by Leon for <p>Open <code>$HOME/.bashrc</code> in a text editor and add the path to the <code>PATH</code> environment variable by adding this line to the file</p>
<pre><code>export PATH="/usr/local/src/sage-5.4.1:$PATH"
</code></pre>
<p>Save the file and either open a new terminal, or type <code>exec bash</code> in the current terminal. Just <code>sage</code> should work now. You will need to edit the above line whenever you have a new Sage installation. This is a standard unix way of making things work without giving the absolute path to the commands. Search Google for <code>unix PATH</code> to learn more.</p>
https://ask.sagemath.org/question/9650/running-sage-from-the-commad-line-in-ubuntu-1204/?comment=47195#post-id-47195I installed it to /home/leon/sage-8.8. How do I create a command `sage` that runs the program? I can't find `$HOME/.bashrc` in the home folder. Btw, I have Linux Mint Mate 19.1.Wed, 17 Jul 2019 10:53:41 +0200https://ask.sagemath.org/question/9650/running-sage-from-the-commad-line-in-ubuntu-1204/?comment=47195#post-id-47195Answer by jdioses for <p>I'm relatively new to Sage and to GNU/ Linux. Sorry in advance if this question seem silly. But I need to learn how to do this. Here is my problem:</p>
<p>I have Sage installed from source in /usr/local/src. So every time I want to run Sage I have to type on the terminal</p>
<pre><code>$ cd /usr/local/src/sage-5.4.1/
</code></pre>
<p>and once inside this directory, I have to type</p>
<pre><code>./sage
</code></pre>
<p>How can I start Sage directly at the prompt $ just by typing "sage"?</p>
<p>Thanks a lot for the answer.</p>
https://ask.sagemath.org/question/9650/running-sage-from-the-commad-line-in-ubuntu-1204/?answer=14397#post-id-14397ppurka,
Great! I'll make a Google search to learn more about PATH. And thanks a lot!
Tue, 25 Dec 2012 21:23:34 +0100https://ask.sagemath.org/question/9650/running-sage-from-the-commad-line-in-ubuntu-1204/?answer=14397#post-id-14397