Bash: test1: command not found Solution

Source: Internet
Author: User

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.

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.