1 系统信息

# 查看centos版本
cat /etc/redhat-release
# 查看cpu信息
lscpu
#查看Linux系统是64位还是32位, 获得word和long的位数。
#32位的系统中int类型和long类型一般都是4字节,64位的系统中int类型还是4字节的,但是long已变成了8字节
getconf WORD_BIT
getconf LONG_BIT
#查看linux系统的体系结构
arch

1.1 ifconfig命令找不到

yum install net-tools.x86_64

1.2 配置静态ip

cd /etc/sysconfig/network-scripts/
vi ifcfg-ens33

BOOTPROTO=static
IPADDR=192.168.110.128
GATEWAY=192.168.110.2
NETMASK=255.255.255.0 
DNS1=114.114.114.114 

service network restart 

1.3 禁用防火墙

# 查看防火墙状态
firewall-cmd --state
# 关闭 && 禁止开机启动防火墙
systemctl disable firewalld.service && systemctl stop firewalld.service

1.3 安装zip工具

# 安裝zip unzip工具
yum install -y unzip zip
unzip -O GBK aa.zip

1.4 安装telnet

# 安裝telnet
yum install -y telnet

1.5 关机

# 关机
shutdown -P now
shutdown -h now
# 取消关机
shutdown -c
# 重启
reboot

Linux基础

系统管理