In ubuntu12.04, configure the python environment variable setenv path "$ path:/usr/local/bin/Python", and the system prompts that the setenv command is not found.
Why? This is because of shell version issues!
The Bourne shell (I .e., SH) is the original shell used by UNIX and can be used on every UNIX. Bourneshell is quite convenient in shell programming, but it is not as convenient as other shells in dealing with user interactions. By default, bouros is the Bourne again shell, which is an extension of the Bourne shell, bash for short. It is fully compatible with the bourneshell and has been added based on the bourneshell to enhance many features. Provides command completion, command editing, command history, and other functions. It also contains many advantages of C shell and kornshell, flexible and powerful editing interfaces, and friendly user interfaces.
C shell is a variant of shell that is more suitable than Bourne shell. Its syntax is similar to that of C. Linux provides tcsh for users who prefer cshell. Tcsh is an extension of cshell. Tcsh includes command line editing, programmable word completion, spelling correction, historical command replacement, Job control, and C-like syntax. It is not only compatible with the bashshell prompt, it also provides more prompt parameters than bash shell.
Korn shell combines the advantages of C shell and Bourne shell and is fully compatible with bourneshell. Linux provides pdksh (Ksh extension), which supports character control. It can be suspended on the command line, executed in the background, and the program can be awakened or terminated.
Linux also includes some popular shells such as ash and zsh. Each shell has its purpose. Some shells have patents and some can be obtained from the Internet or other sources.
Therefore, it is easy to explain why the 'setenv' command cannot be found in Ubuntu. Because setenv/unsetunv is a CSH command and the shell version in Ubuntu is Bash, it cannot be explained. However, there is a corresponding command in bash, and the corresponding relationship is as follows:
- In CSH shell:Input
setenv PATH "$PATH:/usr/local/bin/python"
, Press "enter ".
- In bash shell (Linux ):Input
export PATH="$PATH:/usr/local/bin/python"
, Press "enter ".
- In Sh or KSh shell:Input
PATH="$PATH:/usr/local/bin/python"
, Press "enter ".