Linux常用命令之IP地址设置与网络YUM源配置

Linux常用命令之软件包设置

        • 设置网络地址/ set ip address
        • YUM 常用命令 / yum command

设置网络地址/ set ip address

setup

  • redhat family linux system

vi /etc/sysconfig/network-scripts/ifcfg-eth0

# Generated by parse-kickstart
UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxx"
IPADDR="xx.xx.xx.xx"
BOOTPROTO="static"
DEVICE="eth0"
ONBOOT="yes"
NETMASK=255.255.255.0
GATEWAY=xx.xx.xx.xx
DEFROUTE=yes
DOMAIN="xx.xx.com"
DNS1=xx.xx.xx.xx
DNS2=xx.xx.xx.xx
  • edit ip via vi
  • ONBOOT 修改为YES

service network restart

  • restart to make configuration take effect

YUM 常用命令 / yum command

  • view all yum package list
yum list
  • search yum packge
yum search keyword
  • yum install
yum -y install packagename
  • yum update
yum -y update packagename

update
-y

  • yum remove
yum -y remove packagename

你可能感兴趣的:(linux,网络,tcp/ip)