- 工信部備案號 滇ICP備05000110號-1
- 滇公安備案 滇53010302000111
- 增值電信業(yè)務(wù)經(jīng)營(yíng)許可證 B1.B2-20181647、滇B1.B2-20190004
- 云南互聯(lián)網(wǎng)協(xié)會(huì )理事單位
- 安全聯(lián)盟認證網(wǎng)站身份V標記
- 域名注冊服務(wù)機構許可:滇D3-20230001
- 代理域名注冊服務(wù)機構:新網(wǎng)數碼
Centos5 執行host提示command not found解決方法
本文章介紹了關(guān)于linux中Centos5 執行host提示command not found解決辦法有需要的朋友可參考一下
當顯示-bash: host: command not found的時(shí)候,我們就需要安裝對應的包了
host這個(gè)程序是 bind-utils包里面的
解決辦法
所以要先安裝 bind-utils
代碼如下:
yum install bind-utils
總結
很多的默認安裝包時(shí)都會(huì )有一些工具包不會(huì )安裝,所以大家安?前必須先了解一下相關(guān)包的基礎知識哦。
centos 提示command not found 或許因為權限問(wèn)題
通過(guò)ssh登陸到centos5.4,切換到root賬戶(hù),發(fā)現很多命令提示command not found,今天才搞明白怎么回事,哎,看來(lái)需要從基礎一步一步來(lái)學(xué)習了。知識點(diǎn)涉及到用戶(hù)權限和用戶(hù)切換方面。
joe為普通用戶(hù),root為超級用戶(hù)。
現象如下:
[joe@TRIXBOX1 ~]$ su
口令:
[root@TRIXBOX1 joe]# ifconfig
bash: ifconfig: command not found
su命令格式
su [-|-p] [-c command] [username]
- : 在切換當前用戶(hù)時(shí)切換用戶(hù)工作環(huán)境
-p : 在切換當前用戶(hù)時(shí)不切換用戶(hù)工作環(huán)境,即保持當前用戶(hù)工作環(huán)境,此為缺省值
-c command : 以指定的用戶(hù)身份執行命令 com m and
username : 為要切換的用戶(hù),省略時(shí)表示 root
su和su -的區別,這就是原因所在。
# 切換為超級用戶(hù),不切換用戶(hù)身份
[root@TRIXBOX1 joe]# su
口令:
[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
# 切換為超級用戶(hù) root,同時(shí)切換用戶(hù)身份
[root@TRIXBOX1 joe]# su -
口令:
[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 - 命令后就切換到root環(huán)境了
[joe@TRIXBOX1 ~]$ su -
口令:
[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.3 MiB) TX bytes:3030863 (2.8 MiB)
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.0 b) TX bytes:0 (0.0 b)
[root@TRIXBOX1 ~]#
售前咨詢(xún)
售后咨詢(xún)
備案咨詢(xún)
二維碼
TOP