Solution: The setenv command is not found.

Source: Internet
Author: User
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 ".


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.