PATH is an environmental variable in Linux and other Unix-like operating systems that tells the shell which directories to search for executable files (i.e., ready-to-run programs) in response to commands issued by a user. It increases both the convenience and the safety of such operating systems and is widely considered to be the single most important environmental variable. http://www.linfo.org/path_env_var.html For example, to add the directory /usr/sbin, the following would be used:
An alternative is to employ the export command, which is used to change aspects of the environment. Thus, the above absolute path could be added with the following two commands in sequence
or its single-line equivalent
: is the separator means the next path https://stackoverflow.com/questions/35737627/what-does-the-colon-do-in-path echo $PATH will tell you what it is right now On a default Ubuntu desktop install It is set in .bash_profile for example $PATH is the original path in the system # set PATH so it includes user's private bin if it exists if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi # set PATH so it includes user's private bin if it exists if [ -d "$HOME/.local/bin" ] ; then PATH="$HOME/.local/bin:$PATH" fi export PATH="$PATH:/opt/mssql-tools/bin" # GO export GOROOT="/usr/local/go" export GOPATH="$HOME/goworkspace/project1" export PATH="$GOPATH/bin:$GOROOT/bin:$PATH" |
if you type
No comments:
Post a Comment