1. useradd redhat
2. passwd redhat
3. su –
4. exit
5. df –h 分區(qū)情況
6. du –sh /* 統(tǒng)計文件或目錄使用空間的大小
7. fdisk –l /dev/sda
8. netconfig 配置網(wǎng)絡(luò)參數(shù)
9. ifconfig 顯示網(wǎng)絡(luò)配置信息
10. service network restart
11. route –n 查看路由信息(默認(rèn)路由)
12. ping –b 192.168.0.255 掃描整個網(wǎng)段(檢查活動主機(jī))
13. ifconfig eth0 10.0.0.254 netmask 255.255.255.0 修改IP地址
14. ifconfig eth0顯示指定網(wǎng)卡參數(shù)
15. 修改IP信息后會刪除默認(rèn)路由,需手工添加
route add default gw 192.168.0.1
16. ifconfig route 修改過的參數(shù)不會保存,重啟后會消失
要用service network restart命令把參數(shù)保存到文件ifcfg-eth0
/etc/sysconfig/network-scripts/ifcfg-eth0
可以vi直接修改該文件,然后service network restart 重新啟用網(wǎng)絡(luò)服務(wù)
redhat-config-network-tui是redhat獨有的配置工具,當(dāng)用這個命令配置網(wǎng)絡(luò)參數(shù)后,會寫入到/etc/sysconfig/networking/profiles/目錄里,并且比network-scripts/ifcfg-eth0優(yōu)先,所以用過這個工具配置就不要再使用netconfig,或者先將profiles目錄清空
宇塵網(wǎng)絡(luò),更多服務(wù)器技術(shù)性知識,真誠歡迎您的咨詢訪問。