Ubuntu18.10设置静态IP、DNS、卸载无用软件
设置静态IP
root@xueji:~# vim /etc/network/interfaces # interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback #这行下面添加 auto ens33 iface ens33 inet static address 192.168.244.10 netmask 255.255.255.0 gateway 192.168.244.2
DNS的设置及查看
root@xueji:~# vim /etc/systemd/resolved.conf [Resolve] DNS=119.29.29.29 223.5.5.5 #多个DNS地址使用空格分隔 #FallbackDNS= #Domains= #LLMNR=no #MulticastDNS=no #DNSSEC=no #DNSOverTLS=no #Cache=yes #DNSStubListener=yes
重启系统即可,查看
root@xueji:~# resolvectl status Global LLMNR setting: no MulticastDNS setting: no DNSOverTLS setting: no DNSSEC setting: no DNSSEC supported: no Current DNS Server: 119.29.29.29 DNS Servers: 119.29.29.29 223.5.5.5 DNSSEC NTA: 10.in-addr.arpa 16.172.in-addr.arpa 168.192.in-addr.arpa 17.172.in-addr.arpa 18.172.in-addr.arpa 19.172.in-addr.arpa 20.172.in-addr.arpa 21.172.in-addr.arpa 22.172.in-addr.arpa 23.172.in-addr.arpa 24.172.in-addr.arpa 25.172.in-addr.arpa 26.172.in-addr.arpa 27.172.in-addr.arpa 28.172.in-addr.arpa 29.172.in-addr.arpa 30.172.in-addr.arpa 31.172.in-addr.arpa corp d.f.ip6.arpa home internal intranet lan local private test Link 2 (ens33) Current Scopes: none LLMNR setting: yes MulticastDNS setting: no DNSOverTLS setting: no DNSSEC setting: no DNSSEC supported: no root@xueji:~# ping -c 2 www.baidu.com PING www.a.shifen.com (115.239.211.112) 56(84) bytes of data. 64 bytes from 115.239.211.112 (115.239.211.112): icmp_seq=1 ttl=128 time=11.2 ms 64 bytes from 115.239.211.112 (115.239.211.112): icmp_seq=2 ttl=128 time=12.5 ms
卸载系统无用软件
root@xueji:~# apt-get remove -y libreoffice* \
thunderbird* \
rhythmbox \
aisleriot \
unity-webapps* \
totem \
empathy \
simple-scan \
brasero \
gnome-mahjongg \
gnome-orca \
webbrowser-app \
deja-dup \
onboard \
landscape-client-ui-install \
gnome-sudoku \
gnome-mines \
cheese \
transmission-common \
amazon*
由于有些操作采自网友,但是我给忘记是哪位大佬了,此随笔仅供练习学习使用,如有侵权请留言,我将第一时间删除相关内容。