-- 基本命令
ifconfig :查看当前IP
pwd :查看当前目录
clear :清空
shutdown -r now 或者 reboor :立即关机并重启
shutdown -h now 或者 poweroff :立即关机
shutdown -r 2 :等待两分钟关机重启
-- 修改主机名称
> hostname hadoop001
>vim /etc/sysconfig/network
>vim /etc/hosts (添加ip+主机名)
注:没生效重启计算机
--查看防火墙状态
> service iptables ststus/start/stop/restart
-- 开机自启动防火墙服务关闭
> chkconfig iptables off/on
-- 添加规则防火墙
[root@hadoop001 /]# vim /etc/sysconfig/iptables
-- 修改网卡配置文件
Vim /etc/sysconfig/network-scripts/ifcfg-eth0
-- 重启网络服务
[root@hadoop001 /]# service network restart
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31441024/viewspace-2154149/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/31441024/viewspace-2154149/