To install some software python mysql jdk, you need to add environment variables, a path is added to the environment variable, you can directly enter the XX command in the Linux console.
Otherwise, do not add environment variables, using XX will be prompted to find the command, you need to jump to that directory. then execute the./xx, or every time you play the full path/root/dir1/dir2/dir3/dir4/xx , too long there is a lot of wood trouble.
The simple point is to add an environment variable, or you can use an alias.
The environment variable is the python under Miniconda3, which is python3, if you use Py2, you can source activate Py27 (here Py27 represents a Conda virtual environment name), and then you can Python It's helloworld.py.
You can also use aliases alias py27= '/root/miniconda3/envs/py27/bin/python ' so that you can py27 helloworld.py. The Python environment variables in the environment are still python3.6 and not mutually affected.
Because my miniconda3 below is 3.6, but I often use the python2.7 below, the bin directory has UWSGI supervisor these things, do not want to play a long path, you use alias alias
Alias py27= '/root/miniconda3/envs/py27/bin/python '
Alias supervisord= '/root/miniconda3/envs/py27/bin/supervisord '
Alias supervisorctl= '/root/miniconda3/envs/py27/bin/supervisorctl '
This allows you to use the Supervisord command directly, even if the/root/miniconda3/envs/py27/bin is not an environment variable.
Say so much where to change, Vim/etc/profile, VIM/ETC/BASHRC, Global
Vim ~/.BASHRC for a user.
Alias is the simplification of a long list of commands into a short command. Solve the problem of environment variable to some extent.
Linux alias uses