uname -r 显示内核版本
uname -a 显示主机名、内核版本、硬件平台等详细信息
fdisk -l 查看分区信息
df -hT 查看分区文件系统及空间使用情况
free -m 查看内存使用情况
ip addr 查看系统IP信息
vi /etc/sysconfig/network-scripts/ifcfg-eno16777736 网络接口配置文件
TYPE="Ethernet"
BOOTPROTO="none"
ONBOOT="yes" 系统启动,网卡自动启动
IPADDR0="192.168.1.188"
PREFIX0="24"
GATEWAY0="192.168.1.1"
DNS1="202.102.224.68"
DNS2="202.102.227.68"
systemctl restart network 重启network网络服务
systemctl start network 开启network网络服务
systemctl stop network 关闭network网络服务
nmtui 图形化界面配置
systemctl stop firewalld.service 关闭防火墙服务
systemctl disable firewalld.service 禁止开机自动启动
systemctl status firewalld 查看防火墙状态
关闭selinux
1. setenforce 0 临时关闭SELinux
2.
vi /etc/selinux/config
把里边的一行改为SELINUX=disabled
改了之后保存,然后重启就可以了
3.
查看SELinux状态
执行getenforce命令
关机操作
shutdown、poweroff、halt
[root@localhost ~]#shutdown -h now
[root@localhost ~]#poweroff
重启操作
shutdown、reboot
[root@localhost ~]#shutdown -r now
[root@localhost ~]#reboot
延迟关机或重启操作
系统将在15分钟后重启
[root@localhost ~]# shutdown -r +15 ‘The system will be rebooted !!’
安装网络工具包
[root@centos7 ~]# yum install net-tools -y
[root@centos7 ~]# ifconfig
linux 操作1
猜你喜欢
转载自blog.csdn.net/weixin_43310339/article/details/84338581
今日推荐
周排行