Ask Your Question

Running Sage from the commad line in Ubuntu 12.04

asked 2012-12-25 13:00:15 -0600

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


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

answered 2012-12-25 13:11:53 -0600

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

answered 2012-12-25 14:23:34 -0600

jdioses gravatar image


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


Asked: 2012-12-25 13:00:15 -0600

Seen: 940 times

Last updated: Dec 25 '12