Ask Your Question
1

Running Sage from the commad line in Ubuntu 12.04

asked 2012-12-25 20:00:15 +0100

jdioses gravatar image

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.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
4

answered 2012-12-25 20:11:53 +0100

ppurka gravatar image

Open $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.

edit flag offensive delete link more

Comments

I 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.

Leon gravatar imageLeon ( 2019-07-17 10:53:41 +0100 )edit
0

answered 2012-12-25 21:23:34 +0100

jdioses gravatar image

ppurka,

Great! I'll make a Google search to learn more about PATH. And thanks a lot!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-12-25 20:00:15 +0100

Seen: 3,032 times

Last updated: Dec 25 '12