本次新装的版本是Ubuntu 18.04.1 LTS,与ubuntu 16的设置没有什么区别。
设置term为彩色
打开文件~/.bashrc,将force_color_prompt=yes前面的注释取消,强制显示彩色。可以执行如下语句自动修改文件:
sed -i "s/#force_color_prompt=yes/force_color_prompt=yes/g" ~/.bashrc
设置sudo免密码
sudo vi /etc/sudoers
在文件最后加上这一句, 其中XXXXX是自己的用户名
XXXXX ALL=(ALL) NOPASSWD:ALL
设置国内源
参考链接:https://blog.csdn.net/xiangxianghehe/article/details/80112149,我选的阿里云。
配置samba
参考链接:ubuntu16 samba快速配置
设置git
# 记住密码
git config --global credential.helper store
# 邮箱和用户名,提交代码名需要
git config --global user.email "yufei_email@163.com"
git config --global user.name "ferrisyu"
# 默认使用vim编辑提交记录
git config --global core.editor "vim"
# 设置代理
git config --global http.proxy socks5://192.168.1.103:1080
git config --global https.proxy socks5://192.168.1.103:1080
# 如果要访问国内的,可以取消代理
# git config --global --unset http.proxy
# git config --global --unset https.proxy