前言

重装了系统, 不小心点错了键盘, 用户名设置错了, 再折腾一下其他东西又是一晚上, 幸亏以前用过Ubuntu, 还有点印象,重装前Kali也算是和Ubuntu同源的,都来自Debian,所以没有走太多弯路。

1. SourceList

### Aliyun
# deb http://mirrors.aliyun.com/ubuntu/ vivid main restricted universe multiverse
# deb http://mirrors.aliyun.com/ubuntu/ vivid-security main restricted universe multiverse
# deb http://mirrors.aliyun.com/ubuntu/ vivid-updates main restricted universe multiverse
# deb http://mirrors.aliyun.com/ubuntu/ vivid-proposed main restricted universe multiverse
# deb http://mirrors.aliyun.com/ubuntu/ vivid-backports main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ vivid main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ vivid-security main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ vivid-updates main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ vivid-proposed main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ vivid-backports main restricted universe multiverse

### Netease
deb http://mirrors.163.com/ubuntu/ vivid main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ vivid-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ vivid-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ vivid-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ vivid-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ vivid main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ vivid-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ vivid-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ vivid-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ vivid-backports main restricted universe multiverse

### Bit
# deb http://mirror.bit.edu.cn/ubuntu/ vivid main restricted universe multiverse
# deb http://mirror.bit.edu.cn/ubuntu/ vivid-security main restricted universe multiverse
# deb http://mirror.bit.edu.cn/ubuntu/ vivid-updates main restricted universe multiverse
# deb http://mirror.bit.edu.cn/ubuntu/ vivid-proposed main restricted universe multiverse
# deb http://mirror.bit.edu.cn/ubuntu/ vivid-backports main restricted universe multiverse
# deb-src http://mirror.bit.edu.cn/ubuntu/ vivid main restricted universe multiverse
# deb-src http://mirror.bit.edu.cn/ubuntu/ vivid-security main restricted universe multiverse
# deb-src http://mirror.bit.edu.cn/ubuntu/ vivid-updates main restricted universe multiverse
# deb-src http://mirror.bit.edu.cn/ubuntu/ vivid-proposed main restricted universe multiverse
# deb-src http://mirror.bit.edu.cn/ubuntu/ vivid-backports main restricted universe multiverse

### Bit ipv6
# deb http://mirror.bit6.edu.cn/ubuntu/ vivid main restricted universe multiverse
# deb http://mirror.bit6.edu.cn/ubuntu/ vivid-security main restricted universe multiverse
# deb http://mirror.bit6.edu.cn/ubuntu/ vivid-updates main restricted universe multiverse
# deb http://mirror.bit6.edu.cn/ubuntu/ vivid-proposed main restricted universe multiverse
# deb http://mirror.bit6.edu.cn/ubuntu/ vivid-backports main restricted universe multiverse
# deb-src http://mirror.bit6.edu.cn/ubuntu/ vivid main restricted universe multiverse
# deb-src http://mirror.bit6.edu.cn/ubuntu/ vivid-security main restricted universe multiverse
# deb-src http://mirror.bit6.edu.cn/ubuntu/ vivid-updates main restricted universe multiverse
# deb-src http://mirror.bit6.edu.cn/ubuntu/ vivid-proposed main restricted universe multiverse
# deb-src http://mirror.bit6.edu.cn/ubuntu/ vivid-backports main restricted universe multiverse

2. Flash

cp libflashplayer.so /usr/lib/mozilla/plugins/

3. Input Method

apt-get install fcitx-table-wbpy, 再在Language Support里改框架为fcitx,修改配置重启

4. Desktop

修改一下桌面背景、透明度、终端配色等

5. hostname username

  1. 对于hostname
  • 首先修改 /etc/hostname文件
  • sudo vim /etc/hostname
  • 将其中的主机名改为你所要修改的主机名
  • 再修改 /etc/hosts文件
  • sudo vim /etc/hosts
  • 127.0.0.1 主机名
  • 这里的主机名要和上面修改的一致
  • 修改完成后需重启
  1. 对于username
  • 先切换到tty终端下,如tty1为Ctrl+Alt+F1
  • chfn hypocisy
  • usermod -l hypocrisy hypocisy
  • usermod -d /home/hypocrisy/ -m /home/hypocisy/
  • groupmod -n hypocrisy hypocisy
  • 实际信息可以看/etc/passwd和/etc/shadow

6. Default root

修改lightdm配置 对于早期的系统,打开root登陆,修改 /etc/lightdm/lightdm.conf.d/50-unity-greeter.conf 添加:greeter-show-manual-login=true allow-guest=true 说明:greeter-show-manual-login=true #允许手工输入登陆系统的用户名和密码 allow-guest=true #允许guest登录,可以根据自己的需要修改 保存后重启,就可以通过输入用户名root登陆了 而在15.04中,配置文件位置改变了,为 /user/share/lightdm/lightdm.conf.d/ 加入greeter-show-manual-login=true 之后重启会有错误,再修改/root/.profile tty -s && mesg n

7. Proxy

Shadowsocks

8. root后的问题

root登录后发现他把键有些不能补全,修改/root/.bashrc文件

#if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
#    . /etc/bash_completion
#fi

将上述注释去了即可
root后无声音:修改/root/.profile,最后加一句
pulseaudio --start --log-target=syslog

或者运行alsamixer,修改auto-mute-mode

9. Github

https://help.github.com/articles/generating-ssh-keys/
创建ssh key先,ls -al ~/.ssh查询该主机没有ssh key,于是创建:
ssh-keygen -t rsa -b 4096 -C "[email protected]"
Ensure ssh-agent is enabled:
eval "$(ssh-agent -s)"
Add your SSH key to the ssh-agent:
ssh-add ~/.ssh/id_rsa

open the ~/.ssh/id_rsa.pub file.
Select the entire contents of the file and copy it to your clipboard. Do not add any newlines or whitespace.
Add the copied key to GitHub:

Test the connection:
ssh -T [email protected]

10. Font

YaHei.Consolas.1.12

11. Telegram

挂代理下载包,解压缩直接运行即可。

12. Vim

13. PDF

evince ***.pdf

14. Codeblocks

15. irc 命令行工具

irssi
weechat