为ubuntu安装powerline记录

C:Userswin10的用户名AppDataLocalPackagesCanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgscLocalState ootfshomelinux用户名

sudo apt install powerline

 wget https://github.com/Lokaltog/powerline/raw/develop/font/PowerlineSymbols.otf

mv PowerlineSymbols.otf .local/share/fonts/

cd .local/share/

mkdir fonts

sudo fc-cache -f -v

wget https://github.com/Lokaltog/powerline/raw/develop/font/10-powerline-symbols.conf

mkdir -p .config/fontconfig/fonts.conf

mv 10-powerline-symbols.conf .config/fontconfig/fonts.conf

 cd /usr/share/powerline/bindings/bash/

POWERLINE_SCRIPT=/usr/share/powerline/bindings/bash/powerline.sh
if [ -f $POWERLINE_SCRIPT ]; then
   source $POWERLINE_SCRIPT
fi

虽然知道了了linux子系统的目录位置,但是有时从windows10下拷贝文件到home目录下,需要重新启动window10才能看到,有时就是重新启动也看不到。可以在D盘下建立一个目录,例如shareL目录,将一些linux需要的文件拷贝到目录下,这样到子系统中,使用命令:

cd /mnt/d/shareL,就可以将文件拷贝到home目录直接使用,避免了必需重新启动的尴尬

原文地址:https://www.cnblogs.com/guochaoxxl/p/11544342.html