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

gitclonehttps://github.com/ChestnutHeng/Wudaodict/https://gitee.com/mirrors/wudaodict.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

 

 

posted @   Oliver2022  阅读(160)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· winform 绘制太阳,地球,月球 运作规律
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· AI 智能体引爆开源社区「GitHub 热点速览」
· 写一个简单的SQL生成工具
点击右上角即可分享
微信分享提示