In linux, ifconfig, shutdown, and other commands cannot use _ to enable Shell commands

Source: Internet
Author: User
In linux, ifconfig, shutdown, and other commands cannot use the _ enable Shell command Java code. why cannot I use the ifconfig command in RedHatLinux5? after installing RedHatLinux5, I use some commands on the terminal, such: ifcinfig view local machine...
In linux, commands such as ifconfig and shutdown cannot use the _ enable Shell command Java code. why cannot I use the ifconfig command in RedHat Linux 5? after installing RedHat Linux 5, I use some commands on the terminal, for example, ifcinfig checks the IP address of the local machine and finds that this command cannot be used, prompting "command not found". what should I do? If the environment variable is not loaded, modify the environment variable as follows: www.2cto.com 1. after the system is initially installed, the system is more secure, the PATH of some commands is not in the PATH environment variable. you can use the echo $ PATH command to query and learn how to add the PATH to the PATH environment variable as follows: (such as adding/sbin to the PATH environment variable) (1) If you only want to temporarily add modifications during the current boot process, the next boot will be invalid. you can: enter export PATH = $ PATH:/sbin
(2) If only the current user is permanently added ~ /. In bash_profile, a line similar to this PATH = $ PATH: $ HOME/bin is added near the end, and then it becomes PATH = $ PATH: $ HOME/bin: after the/sbin file is modified and maintained, run source ~ The/. bash_profile command takes effect immediately. (3) if all users in the system are permanently added, after the export PATH = $ PATH:/sbin file is added to the end of the/etc/profile file, run the source etc/profile command to make the modification take effect immediately. 2. there is also a solution [root @ admin007] #/sbin/ifconfig or modify the/etc/profile file [root @ amdin007] # vi/etc/profile to set the following if statement comment out # Path manipulation if ["$ EUID" = "0"]; then pathmunge/sbin pathmunge/usr/local/sbin fi www.2cto.com changed to: # Path manipulation # if ["$ EUID" = "0"]; then pathmunge/sbin pathmunge/usr/local/sbin # fi save and restart the system! After the system is started, try using the command on the terminal to see if it has taken effect. Set important information in linux startup level Java code www.2cto.com/proc cat/proc/cpuinfo-CPU (I. e. vendor, Mhz, flags like mmx) cat/proc/interrupts-interrupt cat/proc/ioports-device IO port cat/proc/meminfo-memory information (I. e. mem used, free, swap size) cat/proc/partitions-information about cat/proc/pci-PCI devices in all partitions of all devices cat/proc/swaps-information about all Swap partitions cat/proc/version-Linux version: www.2cto.com #0-halt (Do NOT set initdefault to this) shut Down (Do not set to Mo (Optional) #1-Single user mode #2-Multiuser, without NFS (The same as 3, if you do not have networking) multi-user mode, but does NOT support NFS #3-Full multiuser mode Full multi-user mode #4-unused useless #5-X11 graphic interface #6-reboot (Do NOT set initdefault to this) restart (do not set as default) in RedHat, you only need to modify the/etc/inittab and find the id :?: Initialization. here? It is [0-6]. if you want to start from the graphic interface, it is 5. if you want to start from the character interface, it is [1-3]. Author 123003473
Related Article

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.