win10下linux常用命令

1、wsl2条件下使用图形化界面
安装VcXsrv Windows X Server
https://techcommunity.microsoft.com/t5/windows-dev-appconsult/running-wsl-gui-apps-on-windows-10/ba-p/1493242
https://sourceforge.net/projects/vcxsrv/
每次都需要在win10上打开xming,设置not access control
设置命令

export DISPLAY="`grep nameserver /etc/resolv.conf | sed 's/nameserver //'`:0"

最好写入~/.bashrc避免每次都输入该命令

2、给debian10更换apt源

deb http://mirrors.aliyun.com/debian/ buster main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib
deb http://mirrors.aliyun.com/debian-security buster/updates main
deb-src http://mirrors.aliyun.com/debian-security buster/updates main
deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib

3、给pip更换国内源
mkdir ~/.pip
cd ~/.pip
新建pip.conf,输入下面内容

[global]
index-url=https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=https://pypi.tuna.tsinghua.edu.cn


启用清华的pip源


4、安装gedit
sudo apt install gedit
然后就可以使用gedit了


5、安装firefox
sudo apt install firefox-esr

6、安装xfce,xrdp
sudo apt install xfce4
sudo apt install xrdp

查看ip
ip addr

查看xrdp运行状态
sudo service xrdp status
如果没有运行需要开启
sudo service xrdp start
然后可以通过win10的远程控制台访问wsl2的linux系统界面(需要输入刚才获取的ip)

7、给wsl设置代理,加快下载速度(前提时本地已开启代理软件)
export http_proxy=http://127.0.0.1:1080
export https_proxy=http://127.0.0.1:1080

8、安装字典
sudo apt-get install dict dictd dict-gcide dict-moby-thesaurus

$ git clone https://github.com/ChestnutHeng/Wudao-dict/
或者https://gitee.com/mirrors/wudao-dict.git
$ cd ./wudao-dict/wudao-dict
$ sudo sh setup.sh 

9、解决通过xming运行gui程序时提示如下错误

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast

解决方法是安装驱动:

sudo apt install libnvidia-gl-440

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

oceanstonetree

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值