Linux.com

How to install python scripts as ROOT?

Link to this post 08 Dec 12

hello guys,
I am using Linux Mint 13 and everytime I open the python scripts I have to define the path that is

cd ~/Documents
./scriptname.py

Can you guys help me find a way to install python scripts so that i can open it up in the terminal without defining the path.?

Link to this post 10 Dec 12

You can add the directory that contains the file to your PATH variable so it will always be accessible.

Honesty my approach for this issue would be to create a ~/.scripts directory, add the line "export PATH=$PATH:~/.scripts" to your .bashrc file and create a symlink to the py file into the .scripts directory. This will allow the file to be easily accessible without showing the entire contents of "~/Documents" in tab complete.

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board