Debian11.5设置静态IP 221021记录

设置Ip

在这里插入图片描述

对应影响的配置文件是 /etc/NetworkManager/system-connections/'Wired connection 1'

sudo cd /etc/NetworkManager/system-connections/
sudo nano /etc/NetworkManager/system-connections/'Wired connection 1'

内容为

[connection]
id=Wired connection 1
uuid=923cd012-af03-46f6-9774-cdfce75aea88
type=802-3-ethernet

[802-3-ethernet]
mac=00:0C:29:4D:5E:0D

[ipv4]
method=manual
dns=192.168.168.2;8.8.4.4;223.6.6.6;
addresses1=192.168.168.115;24;192.168.168.2;

[ipv6]
method=auto
ip6-privacy=2
设置DNS

设置DNS的文件是 /etc/resolv.conf

经测试,在图形界面设置DNS后, /etc/resolv.conf 的内容会相应改变
在这里插入图片描述

cat /etc/resolv.conf
sudo vi /etc/resolv.conf

可看到, /etc/resolv.conf 的内容对应图形界面的DNS

# Generated by NetworkManager
nameserver 192.168.168.2
nameserver 114.114.114.114
nameserver 8.8.8.8

所以在命令行界面可以用修改该文件的方式修改DNS

packages popcon size type description
network-manager V:369, I:434 14941 config::NM NetworkManager (daemon): manage the network automatically
network-manager-gnome V:127, I:365 5428 config::NM NetworkManager (GNOME frontend)
ifupdown V:587, I:986 217 config::ifupdown standardized tool to bring up and down the network (Debian specific)
isc-dhcp-client V:219, I:982 2894 config::low-level DHCP client
pppoeconf V:0, I:7 192 config::helper configuration helper for PPPoE connection
wpasupplicant V:336, I:494 3910 , , client support for WPA and WPA2 (IEEE 802.11i)
wpagui V:0, I:2 801 , , Qt GUI client for wpa_supplicant
wireless-tools V:173, I:231 297 , , tools for manipulating Linux Wireless Extensions
iw V:202, I:467 294 , , tool for configuring Linux wireless devices
iproute2 V:701, I:952 3291 config::iproute2 iproute2, IPv6 and other advanced network configuration: ip(8), tc(8), etc
iptables V:308, I:925 2477 config::Netfilter administration tools for packet filtering and NAT (Netfilter)
iputils-ping V:205, I:997 118 test test network reachability of a remote host by hostname or IP address (iproute2)
iputils-arping V:5, I:71 60 test test network reachability of a remote host specified by the ARP address
iputils-tracepath V:4, I:44 52 test trace the network path to a remote host
ethtool V:97, I:272 635 test display or change Ethernet device settings
mtr-tiny V:6, I:53 161 test::low-level trace the network path to a remote host (curses)
mtr V:4, I:44 214 , , trace the network path to a remote host (curses and GTK)
gnome-nettool V:1, I:29 2492 , , tools for common network information operations (GNOME)
nmap V:27, I:231 4453 , , network mapper / port scanner (Nmap, console)
zenmap V:0, I:3 2939 , , network mapper / port scanner (GTK)
tcpdump V:18, I:197 1336 , , network traffic analyzer (Tcpdump, console)
wireshark I:51 61 , , network traffic analyzer (Wireshark, GTK)
tshark V:2, I:30 416 , , network traffic analyzer (console)
tcptrace V:0, I:2 401 , , produce a summarization of the connections from tcpdump output
snort V:0, I:1 2203 , , flexible network intrusion detection system (Snort)
ntopng V:1, I:1 15904 , , display network usage in web browser
dnsutils V:35, I:408 278 , , network clients provided with BIND: nslookup(8), nsupdate(8), dig(8)
dlint V:0, I:5 53 , , check DNS zone information using nameserver lookups
dnstracer V:0, I:1 60 , , trace a chain of DNS servers to the source

Debain各版本 bd cd dvd iso 归档下载地址 — Debian CDs/DVDs archive — http://cdimage.debian.org/cdimage/archive/

阿里巴巴开源镜像站
阿里巴巴开源镜像站—Debian 镜像
阿里巴巴开源镜像站—Debian security镜像

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

kfepiza

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值