Linux under-bash: * * *: Command not found solution __linux

Source: Internet
Author: User

Today, when you configure the environment on the Aliyun virtual machine,-bash: * * *: Command not found error, search the Internet, the following methods:

such as input ls: appears-bash:ls:command not found

Ipconfig appears-bash:ipconfig:command not found

First echo $PATH find. Display Java_home/bin:. Path:/root/bin

Reason: When setting the environment variable, the edit profile file is not written correctly, resulting in the command not being recognized at the command line. Solution:

Export Path=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

Echo $PATH found. Show/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

to the above will only be valid for this landing shell, if permanently available, you must do the following:

Open the/etc/profile with a text editor and add the path. Configure for me as follows

Before the configuration:

J ava_home=/usr/java/jdk1.7.0_40
Classpath=.:. Java_home/lib.tools.jar
Path=. Java_home/bin:. PATH
Export Java_home CLASSPATH PATH
Add path following

#set Java Environment

Java_home=/usr/java/jdk1.7.0_40
Classpath=.:. Java_home/lib.tools.jar
Path=. Java_home/bin:. Path:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
Export Java_home CLASSPATH PATH






Why would you do that?

The

should first consider whether or not the environment variables are already contained in the $path of root. &NBSP

is the main four:/bin,/usr/bin,/sbin,/usr/sbin. &NBSP

Four main stored dongdong:  

./bin: 

bin for binary the main place to put some of the system's prerequisite executable files such as: Cat, CP, chmod DF, DMESG, gzip, kill, LS, mkdir, more, Mount, RM, Su, tar and so on. &NBSP

/usr/bin: 
Key prerequisites for applying software tools such as C + +, g++, GCC, Chdrv, diff, Dig, Du, eject, elm, free, gnome*, gzip, HTPASSWD, KFM, Ktop, last, less, locale, M4, make, man, Mcopy, NcFTP, newaliases, Nslookup, passwd, quota, smb*, etc. &NBSP


/sbin: 
Mainly places system-managed Prerequisites for example: Cfdisk, dhcpcd, Dump, E2FSCK, Fdisk, Halt, Ifconfig, Ifup, Ifdown, Init, Insmod, Lilo, Lsmod, MKE2FS, Modprobe, Quotacheck, reboot, Rmmod, runlevel, shutdown, etc. &NBSP


/usr/sbin: 
To place some of the prerequisite programs for network administration, such as DHCPD, HTTPD, IMAP, IN.*D, inetd, LPD, named, Netconfig, NMBD, Samba, sendmail, squid, swap, TCPD, tcpdump, etc. &NBSP

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.