首页 > 系统相关 >ubuntu 修改网络 静态IP

ubuntu 修改网络 静态IP

时间:2023-08-16 21:13:21浏览次数:31  
标签:24 sudo addresses 静态 IP netplan 192.168 ## ubuntu

network:
  version: 2
  renderer: networkd
  ethernets:
    ## 可以ip a查看以太网连接名称
    eth0:
      dhcp4: no
      dhcp6: no
      ## addresses添加网络掩码,如192.168.56.3/24
      addresses:
        - 192.168.38.105/24
      routes:
        - to: default
          via: 192.168.38.99
      nameservers:
        addresses:
          - 223.5.5.5
          - 1.1.1.1

# nano /etc/netplan/*** 文件名排序排在前面的有效
# sudo netplan try
# sudo netplan generate
# sudo netplan apply

标签:24,sudo,addresses,静态,IP,netplan,192.168,##,ubuntu
From: https://www.cnblogs.com/chasingdreams2017/p/17636196.html

相关文章

  • [React Typescript] Well typed a React Context provider
    importReactfrom"react";import{Equal,Expect}from"../helpers/type-utils";constcreateRequiredContext=<Textendsany>()=>{constcontext=React.createContext<T|null>(null);constuseContext=<Te......
  • Echart图表 之 tooltip提示框组件配置项大全
    axisPointer:坐标轴指示器配置项label:坐标轴指示器的文本标签lineStyle:axisPointer.type为line时有效shadowStyle:axisPointer.type为shadow时有效crossStyle:axisPointer.type为cross时有效。textStyle:提示框浮层的文本样式其中也会含有很多属性,具体使用请参考一下内容1tooltip......
  • [React Typescript] Fixing type inference in a Custom React Hook
    //Problemimport{useState}from"react";import{Equal,Expect}from"../helpers/type-utils";exportconstuseId=(defaultId:string)=>{const[id,setId]=useState(defaultId);return[id,setId];};const[id,setI......
  • IPQ5018|Unlocking Affordable WiFi 6: The Ultimate Solution
    IPQ5018|UnlockingAffordableWiFi6:TheUltimateSolutionIntheeraoflightning-fastconnectivitydemands,findingtheperfectsynergybetweenperformance,efficiency,andcost-effectivenessisparamount.IntroducingtheDR5018-aWiFi6solutionthat......
  • 独立站与代理IP:打造稳定安全的网站环境
    互联网的发展日新月异,现如今,越来越多的企业和个人通过搭建独立站的方式来展示自己的品牌和内容。独立站的优势是具有灵活性和自主性,但同时也需要面对网络安全和稳定性的挑战。在这个时候,代理IP的作用变得尤为重要,它可以帮助独立站构建一个稳定安全的网站环境。首先,代理IP可以提供更......
  • JavaScript面试题2
    JavaScript21.下面代码的输出是什么?functionsayHi0{ console.log(name);        console.log(age);        varname="Lydia";        letage=21;       }//打印出来:undefined和......
  • javascript学习笔记day2
    今天在b站跟学了黑马的前端js课程,因为是第一天学习都对于我们这种学过了的来说其实挺简单的,不过今天一边做公司的项目一边学习多少是有点时间不够的感觉,看样子明天要开二倍看了,下面是今天的笔记什么是js:javascript是人机交互的一种编程语言js由哪几部分组成:ECMAScript和webapis......
  • Ubuntu安装xar命令
    下载xar源码包wgethttps://github.com/mackyle/xar/archive/refs/tags/xar-1.6.1.zip安装编译依赖包apt-getinstallautoconfautomakelibtoolzlib1g-devmakezlib-devel开始编译安装#解压unzipxar-1.6.1.zip#进入xar安装cdxar-xar-1.6.1/xar#编译......
  • Ubuntu18.04 切换内核版本
    安装内核sudosed-i'$a\debhttps://mirrors.ustc.edu.cn/ubuntu/bionic-proposedmainrestricteduniversemultiverse\​deb-srchttps://mirrors.ustc.edu.cn/ubuntu/bionic-proposedmainrestricteduniversemultiverse\'/etc/apt/sources.listsu......
  • typeScript学习-interface和type 区别
    typeScript学习interface(接口)和type区别type和接口类似,都用来定义类型,但type和interface区别如下:区别1:定义类型范围不同interface只能定义对象类型或接口当名字的函数类型。type可以定义任何类型,包括基础类型、联合类型、交叉类型,元组。//type定义基础类型typ......