系统环境查询

系统环境查询

[root@Backup-script-machine ~]# cat /etc/redhat-release                              //系统版本
CentOS release 6.7 (Final)

[root@Backup-script-machine ~]# uname -r                                                   //内核版本
2.6.32-573.el6.x86_64

[root@Backup-script-machine ~]# uname -m                                                  //系统架构
x86_64

[root@Backup-script-machine ~]# echo $LANG                                              //系统字符集
en_US.UTF-8         

service network restart                             //centos6的网卡重启

systemctl restart network                            //centos7的网卡重启

cat /etc/resolv.conf                               //DNS配置文件

cat /etc/hosts                                   //设置主机和IP绑定信息
cat /etc/hostname                                 //设置主机名

systemctl status firewalld.service                      //查看防火墙状态
systemctl stop firewalld                            //关闭
systemctl start firewalld                           //开启
systemctl disable firewalld                          //开机自动关闭
systemctl enable firewalld                           //开机自动启动
chkconfig --list|grep network(RHLE6)                    //查看开机是否启动

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!学习中待续!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

 

posted on 2020-08-21 10:42  调皮小蚊子  阅读(106)  评论(0编辑  收藏  举报