Problem description: after setting up a Linux environment on a virtual machine (such as VMware) Again, program C and C ++. It is very likely that
Bash: test1: Command not found.
Solution: VI ~ /. Bashrc, and add the following to the last line of the file:
Path = $ path :.
As shown in:
At this time, the restart is interrupted. After the compiled files are run, the program results will be displayed.
Bytes ---------------------------------------------------------------------------------------------------
The following is a more detailed description.
If the newly installed system runs commands such as shutdown and fdisk, the prompt Bash: Command not found is displayed. So
First, consider whether the root $ path contains these environment variables.
The main four are:/bin,/usr/bin,/sbin,/usr/sbin.
Four major storage items:
./Bin:
The short description of "bin" as "binary" mainly places some necessary execution files of the system, for example: cat, CP, chmod DF, dmesg, Gzip, kill, ls, mkdir, more, mount, RM, Su, tar, etc.
/Usr/bin:
It mainly stores necessary execution files for some application 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 *, and wget.
/Sbin:
It mainly includes some necessary programs for system management, such: cfdisk, dhcpcd, dump, e2fsck, fdisk, halt, ifconfig, IFUP, ifdown, init, insmod, Lilo, lsmod, mke2fs, modprobe, quotacheck, reboot, rmmod, runlevel and Shutdown.
/Usr/sbin:
Place some necessary network management programs such as DHCPD, httpd, IMAP, and in. * D, inetd, lpd, named, netconfig, nmbd, Samba, Sendmail, squid, swap, tcpd, and tcpdump.
You can view the path in. bash_profile in the home directory. If it is: Path = $ path: $ home/bin, add it as follows:
Path = $ path: $ home/bin:/sbin:/usr/bin:/usr/sbin
When centos5.5 is installed on a virtual machine and some normal commands such as init, shutdown, and fdisk are run, the following prompt appears:
Bash: XX command not found.
First, check whether these environment variables are included in the root $ path. (this may be because I chose "minimal installation" during installation, which causes some functions to be disabled ).
The main four are:/bin,/usr/bin,/sbin,/usr/sbin.