ITPub博客

首页 > Linux操作系统 > Linux操作系统 > CentOS6.5常用命令学习(一)

CentOS6.5常用命令学习(一)

原创 Linux操作系统 作者:13545163656 时间:2018-05-07 20:32:37 0 删除 编辑

-- 基本命令

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博客 ” ,链接:https://blog.itpub.net/31441024/viewspace-2154149/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2017-03-05

  • 博文量
    70
  • 访问量
    97993