Bash: test1: command not found solution Description: re-program c and c ++ after setting up a linux environment on a virtual machine (such as vmware, when running compiled files, bash: test1: command not found may occur. Solution: vi ~ /. Bashrc, and add: PATH = $ PATH :. as shown in: At this time, restart is interrupted. After the compiled files are run, the program results will appear. ------------------------------------------------ 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. 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: Short for "bin" is mainly used to place some required 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: mainly contains 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, 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 installed CentOS5.5 on the VM today. When it finds that some commands such as init, shutdown, and fdisk are running normally, it prompts 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.