In Linux, ifconfig, shutdown, and other commands cannot use _ to enable shell commands
Source: Internet
Author: User
Why can't I use the ifconfig command in RedHat Linux 5? After I have installed RedHat Linux 5, I use some commands on the terminal, for example, ifcinfig, to view the IP address of the local machine, the system prompts "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 Linux Startup level Java Code Important information in 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) shutdown (do not set to default) #1-single user Mo De 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].
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.