Bash: test1: Command not found

Source: Internet
Author: User

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.

 

 

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.