Refer to others: not tidy (sorry ~)
"/bin", "/sbin", "/usr/bin", "/usr/sbin", "/usr/local/bin" and other paths are already in the system environment variables, if the executable file in these standard locations, in the terminal command line enter the software executable file name and parameters ( If parameters are required), enter.
If not in a standard location, the file name needs to be preceded by a full path. But it's too much trouble to run like this every time, a "once and for all" approach is to add this path to the environment variable. Command Export $PATH = "path" (or "path= $PATH: Path") ($PATH is the environment variable name, such as DVSDK; call with $DVSDK) can add this path to the environment variable, But quitting the command line is dead. This line needs to be added to the environment variable file in order to be permanently active. There are two files to choose from: "/etc/profile" and ". Bash_profile" in the user's home directory, "/etc/profile" is valid for all users in the system, ". Bash_profile" in the user's home directory is only valid for this user .
Export $PATH = "$PATH: Path 1: Path 2: ...: path n" (or "path= $PATH: Path 1: Path 2: ...: path n" ), This means that the path to the executable file includes the path originally set, and all paths from "Path 1" to "Path N" are included. When the user enters a string of characters and presses ENTER, the shell will find the corresponding executable file in these paths in turn and hand it over to the system core execution. The "$PATH" means that the path originally set is still valid, so be careful not to miss out. Some software may also have an environment variable of type "PATH" that needs to be added, but the method is the same, and you also need to be aware of "$".
Note that, unlike Dos/window, the path names in the UNIX class system environment variables are separated by colons, not semicolons. In addition, the more loaded the software, the more environment variables, in order to avoid confusion, it is recommended that all statements are added at the end of the file, in the software installation order.
RELATED links:
http://blog.csdn.net/wl_fln/article/details/7258294//export is a better speaker.
http://www.2cto.com/os/201306/222995.html//Almost
http://blog.csdn.net/xiaominghimi/article/details/7339974//This is about the NDK, SDK introduces environment variables, the unique
Linux + Export