In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article shows you Centos5 implementation of host prompt command not found solution is how, the content is concise and easy to understand, absolutely can make your eyes bright, through the detailed introduction of this article, I hope you can get something.
When-bash: host: command not found is displayed, we need to install the corresponding package
Host this program is included in the bind-utils package.
Solution.
So install bind-utils first.
The code is as follows:
Yum install bind-utils
Summary
Many default installation packages will have some toolkits that will not be installed, so you must know the basics of the package before installing it.
Centos prompts command not found that it may be due to permission issues.
Log in to centos5.4 through ssh, switch to the root account, find a lot of command prompts command not found, today to figure out what's going on, hey, it seems that you need to learn from the basics step by step. Knowledge points are related to user rights and user switching.
Joe is an ordinary user and root is a super user.
The phenomena are as follows:
[joe@TRIXBOX1 ~] $su
Password:
[root@TRIXBOX1 joe] # ifconfig
Bash: ifconfig: command not found
Su command format
Su [- |-p] [- c command] [username]
-: switch the user's work environment when switching the current user
-p: do not switch the user's work environment when switching the current user, that is, keep the current user's work environment. This is the default value.
-c command: execute the command command as the specified user
Username: for the user to be switched, it means root when omitted
That's the difference between su and su -.
# switch to superuser and do not switch user identity
[root@TRIXBOX1 joe] # su
Password:
[root@TRIXBOX1 joe] # env | egrep 'USER | LOGNAME | PATH | MAIL'
USER=joe
MAIL=/var/spool/mail/joe
PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/joe/bin
LOGNAME=joe
# switch to superuser root and switch user identity at the same time
[root@TRIXBOX1 joe] # su-
Password:
[root@TRIXBOX1 ~] # env | egrep 'USER | LOGNAME | PATH | MAIL'
USER=root
MAIL=/var/spool/mail/root
PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
LOGNAME=root
[root@TRIXBOX1 ~] #
Su-switch to the root environment after the command
[joe@TRIXBOX1 ~] $su-
Password:
[root@TRIXBOX1 ~] # ifconfig
Eth0 Link encap:Ethernet HWaddr 00:15:60:9D:F1:A8
Inet addr:192.168.6.55 Bcast:255.255.255.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:69028 errors:0 dropped:0 overruns:0 frame:0
TX packets:39738 errors:0 dropped:0 overruns:0 carrier:0
Collisions:0 txqueuelen:1000
RX bytes:102040430 (97.3MiB) TX bytes:3030863 (2.8MiB)
Interrupt:169 Memory:e0500000-e0510000
Lo Link encap:Local Loopback
Inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
Collisions:0 txqueuelen:0
RX bytes:0 (0.0b) TX bytes:0 (0.0b)
[root@TRIXBOX1 ~] #
The knowledge of user rights still needs to be learned, hehe.
The above is what the solution of Centos5's host prompt command not found is. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.