[Ubuntu] 顯示使用中的 DNS Server 列表

顯示使用中的 DNS Server 列表

個人覺得最快也最簡單的方式就是直接 cat /etc/resolv.conf

執行後畫面輸出如下:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.1.1

 

如果有設定多個 DNS Server

則會出現多行 nameserver x.x.x.x

 

雖然網路上有不少人給的答案是利用 nmcli 去取得

但筆者測試固定 IP 或 DHCP Client 都沒有顯示 IP4.DNS

手邊的系統版本為 16.04.3 LTS (Xenial)


References:
Command-line to list DNS servers used by my system – Ask Ubuntu
networking – What DNS servers am I using? – Unix & Linux Stack Exchange

[CentOS] 加入第三方套件庫

如果想要安裝一個套件

不想透過自行編譯或是手動下載 RPM 套件包進行安裝的話

但是系統預設的套件庫又找不到想要安裝的套件時

可以透過加入第三方套件庫來解決這個問題

 

CentOS 官方 WIKI  可以找到一些可信任的第三方套件庫

本文以 Extra Packages for Enterprise Linux (EPEL) 作為範例實作。

Read more “[CentOS] 加入第三方套件庫”

[Ubuntu] dpkg: warning: files list file for package * missing; assuming package has no files currently installed

某天在 Ubuntu 上使用 apt-get install 安裝套件時狂噴 warning …

dpkg: warning: files list file for package 'node-lockfile' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libhtml-tagset-perl' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'node-normalize-package-data' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'update-inetd' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'x11proto-dri2-dev' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'node-npmlog' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'liblockfile-bin' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'liblzma5:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'liblzma5:i386' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'python-gnupginterface' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libhttp-date-perl' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libjs-node-uuid' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'pdksh' missing; assuming package has no files currently installed
# 族繁不及備載...

Read more “[Ubuntu] dpkg: warning: files list file for package * missing; assuming package has no files currently installed”