关闭iptables服务及命令行链接wifi及locale设置

Ubuntu系统启动时都会自动启动iptables服务。若是想关闭该服务的自动启动,能够执行:bash

sudo ufw disable

命令行方式链接某个SSID:spa

sudo nmcli d wifi connect $SSID_NAME password $SSID_PASS

wget下载须要用户名及密码的资源:命令行

$ wget --user=??? --password=??? http://xxx/xxx/xxx
$ wget --user=??? --password=??? ftp://xxx/xxx/xxx

  关于locale设置问题,执行apt时一般会提示以下错误:code

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_TIME = "zh_CN.UTF-8",
    LC_MONETARY = "zh_CN.UTF-8",
    LC_ADDRESS = "zh_CN.UTF-8",
    LC_TELEPHONE = "zh_CN.UTF-8",
    LC_NAME = "zh_CN.UTF-8",
    LC_MEASUREMENT = "zh_CN.UTF-8",
    LC_IDENTIFICATION = "zh_CN.UTF-8",
    LC_NUMERIC = "zh_CN.UTF-8",
    LC_PAPER = "zh_CN.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

 按以下步骤解决:blog

$ sudo apt-get install locales

 编辑文件/etc/locale.gen,找到# en_US.UTF-8 UTF-8,去掉前面的井号;ip

$ sudo locale-gen en_US.UTF-8
$ sudo update-locale en_US.UTF-8

编辑~/.bashrc,在最后面增长一行并经过source命令使其生效:资源

export LC_ALL=C
$ source .bashrc

或者修改/etc/default/locale:get

$ cat /etc/default/locale 
LC_ALL="en_US.UTF-8"

 到此应该能解决错误信息提示问题,可是系统可能没法显示中文,因此若是但愿正确显示中文,须要安装中文包:table

$ sudo apt-get install language-pack-zh-hans
相关文章
相关标签/搜索