Linux从0开始配置
2019-01-20
安装的软件
vscode
hyper
搜狗拼音
如果出现qt4
的依赖错误
使用麒麟社区版本,见下方代码区(参考:cnblogs )
先添加rock-core/qt4
的apt源,然后添加软件源 :例如在/etc/apt/sources.list
中添加http://kr.archive.ubuntu.com/ubuntu/ xenial main
然后再sudo update
chrome
dukto
如出现依赖错误:sudo add-apt-repository ppa:rock-core/qt4
EasyConnect
在新版ubuntu中出现错误Pango-ERROR **: 10:23:45.377: Harfbuzz version too old
降级Pango
cnblogs 在https://pkgs.org/ 下载
libpangocairo-1.0.so.0
libpango-1.0.so.0
libpangoft2-1.0.so.0
注意在选择包的时候请选择Ubuntu 18.04 LTS
或以下的版本,使依赖的Harfbuzz
版本降低
解压这3个deb包(dpkg -X {src} {dst}
),放到/usr/share/sangfor/EasyConnect
目录下
ldd EasyConnect | grep pango
升级Harfbuzz
(TODO )cnblogs
code sudo apt install git -y git config --global user.email "2104934038@qq.com" git config --global credential.helper store mkdir ~/darkin_blade && cd ~/darkin_blade git clone https://github.com/Linux-setting/my_rc rm -f ~/.vimrc && ln ~/darkin_blade/my_rc/vimrc ~/.vimrc git clone https://github.com/Linux-setting/vim mv vim ~/.vim git clone https://github.com/Linux-setting/powerline.git mv powerline ~/.config sudo apt install vim-gtk3 -y sudo apt install zsh -y sudo apt install python3-pip -y python3 -m pip install powerline-status sudo apt install powerline-gitstatus -y mkdir ~/trash && cd ~/trash git clone https://github.com/powerline/fonts.git cd fonts./install.sh cd ~/trashsh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -) " rm -f ~/.zshrc && ln ~/darkin_blade/my_rc/zshrc ~/.zshrc git clone https://github.com/zsh-users/zsh-syntax-highlighting.git mv zsh-syntax-highlighting ~/.config wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - sudo apt install apt-transport-https echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.listsudo apt update sudo apt install sublime-text -y sudo apt install axel -y sudo apt install chromium-browser -y sudo apt install exo-utils -y sudo apt install exfat-utils -y sudo apt install pcmanfm -y sudo apt remove nautilus -y sudo apt install gnome-tweaks -y sudo apt install gparted baobab -y sudo apt install net-tools -y sudo apt install locate apt-file aptitude -y sudo apt install fcitx-mozc -y sudo apt install byzanz -y wget -qO - 'https://keyserver.ubuntu.com/pks/lookup?&op=get&search=0x73BC8FBCF5DE40C6ADFCFFFA9C949F2093F565FF' | sudo apt-key add - sudo apt-add-repository 'deb http://archive.ubuntukylin.com/ukui focal main' sudo apt update sudo apt install sogouimebs sudo apt install npm -y sudo npm install -g hexo cd ~/darkin_bladegit clone https://github.com/darkin-blade/ejs_2 cd ~ && mkdir blog && cd bloghexo init git init && git remote add origin https://github.com/niabie/hexo_source git fetch && git reset --hard origin/master npm cache clean --force sudo npm install cd themes && ln -s ~/darkin_blade/ejs_2 ./ejs_2cd ~ && mkdir aaaatrox && cd aaaatroxhexo init git init && git remote add origin https://github.com/aaaatrox/hexo_source git fetch && git reset --hard origin/master npm cache clean --force sudo npm install cd themes && ln -s ~/darkin_blade/ejs_2 ./ejs_2sudo apt install ntpdate sudo ntpdate time.windows.com sudo hwclock --localtime --systohc
重要步骤 git
全局设置
git config --global user.name "Lynx" git config --global user.email "1197225628@qq.com" git config --global core.editor vim git config --global color.ui true
powerline
python安装pip
菜鸟教程
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py sudo python get-pip.py sudo apt-get install python3-pip
pip安装powerline
详细
pip install powerline-status pip3 install powerline-status
pip安装powerline-gitstatus
github
sudo apt install powerline-gitstatus pip install powerline-gitstatus pip3 install powerline-gitstatus
复制配置文件
git clone https://github.com/Linux-setting/powerline.git mv powerline .config/
安装powerline字体
详细
git clone https://github.com/powerline/fonts.git cd fonts./install.sh
修改终端字体设置
找不到powerline-config
mkdir $HOME/.local/lib/python3.6/site-packages/scripts/
if not exists
Find where powerline-config
locates. For example $HOME/.local/bin/powerline-config
cp $HOME/.local/bin/powerline* $HOME/.local/lib/python3.6/site-packages/scripts/.
vim
install vim with clipboard
sudo apt install vim-gtk3
转移.vimrc,修改powerline相对路径
安装支持python的vim(查看vim --version
),详细 :
brew install vim --with-python
sudo apt install vim-gnome
如果需要使用系统剪切板功能,必须安装vim-gnome
复制插件(branch clean
)git clone https://github.com/Linux-setting/vim.git mv vim .vim
注意:
ubuntu
默认只装了vi
而不是vim
如果出现无法写入.vim/view
的问题,直接把文件夹删掉
插件包含:推荐插件
修改rtp
zsh
安装zsh
wget安装oh-my-zsh
sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
转移.zshrc,修改powerline相对路径
安装zsh-syntax-highlighting
详细
brew install zsh-syntax-highlighting
然后将source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
加到.zshrc
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git mv zsh-syntax-highlighting ~/.config/zsh-syntax-highlighting
然后将source $HOME/zsh-syntax-highlighting/zsh-syntax-highlighting.git
加到.zshrc
设置zsh为默认shell