Linux Daily

3. 远程登陆Centos时,出现"UTF-8" Warning

WARNING: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
  • 修复

修改 `/ect/environment` 文件,添加以下行:

LANG=en_US.utf-8
LC_ALL=en_US.utf-8

下次SSH不再出现该错误。

2. Centos 安装dig和nslookup工具

  • Centos/Fedora
# yum install bind-utils
  • Ubuntu
sudo apt-get install dnsutils
  • Debian
# apt-get update && apt-get install dnsutils

1.dig/nslookup指定DNS查询

$ dig @114.114.114.114 netcj.com

$ nslookup netcj.com 114.114.114.114

## 指定DNS端口

$ dig -p 53 @114.114.114.114 netcj.com

$ nslookup
> set port=53
> netcj.com 114.114.114.114
显示评论