1

Ubuntu 环境配置大合集

 1 year ago
source link: https://ywang-wnlo.github.io/posts/72a4cdfd.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

本文主要记录个人使用 Ubuntu 中遇到的各种琐碎问题的解决方法,以及环境配置

修改默认编辑器为 vim

一般 Ubuntu 的默认编辑器是 nano,用起来非常不顺手,可以通过下面命令修改

sudo update-alternatives --config editor
# 然后选择为 vim.basic 即可

解决报错 perl: warning: Setting locale failed

vim .bashrc
# vim .zshrc

# 新增以下内容
export LC_ALL="en_US.UTF-8"

然后重新登录 shell 或者手动执行一下 export LC_ALL="en_US.UTF-8"

然后再执行

sudo locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales
# 配置过程中选择 en_US.UTF-8 一路确定即可

Ubuntu 默认时间是 UTC 时间,可以通过修改时区来显示本地的时间

# 查看当前时区
timedatectl

# 不知道时区名可以通过 tzselect 获取
tzselect

# 配置当前时区为 Asia/Shanghai
sudo timedatectl set-timezone Asia/Shanghai
赏个鸡腿🍗

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK