系统环境查询
[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) //查看开机是否启动
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!学习中待续!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!