Ubuntu16.04 常用配置
更换源:
将之前的源文件备份:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.orig
修改源文件:
sudo gedit /etc/apt/sources.list
将source.list文件中的内容替换为目标源(以阿里云源为例):
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties deb http://mirrors.aliyun.com/ubuntu/ xenial universe deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties deb http://archive.canonical.com/ubuntu xenial partner deb-src http://archive.canonical.com/ubuntu xenial partner deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse
更新源:
sudo apt-get update
更新软件:
sudo apt-get upgrade
更换主题:
安装图形化管理工具unity-tweak-tool:
sudo apt-get install unity-tweak-tool
安装Flatabulous主题:
sudo add-apt-repository ppa:noobslab/themes sudo apt-get update sudo apt-get install flatabulous-theme
安装主题配套图标:
sudo add-apt-repository ppa:noobslab/icons sudo apt-get update sudo apt-get install ultra-flat-icons
打开unity-tweak-tool,将主题修改为Flatabulous,图标修改为Ultra-flat
更变Unity启动器(菜单栏)位置:
移动到桌面底部:
gsettings set com.canonical.Unity.Launcher launcher-position Bottom
恢复到桌面左侧:
gsettings set com.canonical.Unity.Launcher launcher-position Left
更换壁纸:
不错的壁纸网站:
BASH配置:
自定义Bash提示信息:
PS1='╭─(\[\033[01;32m\]\u\[\033[00m\]@\[\033[01;35m\]\H\[\033[00m\])-(\[\033[01;34m\]\w\[\033[00m\])\n╰─\[\033[01;33m\](\#)-->\[\033[00m\] '
Bash自动补全忽略大小写:(在~/.inputrc中加入如下内容)
set completion-ignore-case on
Git常用配置:
git diff ^M的消除:
git config --global core.whitespace cr-at-eol
U盘:
只读修复:(/dev/sdb 需要根据实际挂载点修改,可以通过df查看)
sudo dosfsck -v -a /dev/sdb