wsl--set-default-version2
修改Ubuntu20.04下載源
vim /etc/apt/sources.list
在末尾加入
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-srchttp://mirrors.aliyun.com/ubuntu/focal-backportsmainrestricteduniversemultiverse
sudo apt-get update
sudo apt-get upgrade -y

sudo apt install xorg
sudo apt-get install xfce4
sudo apt-get install xrdp
sudo apt-get install net-tools
sudo apt install -y lightdm

sudo apt install xfce4-goodies


sudo dpkg-reconfigure lightdm

echo"xfce4-session">~/.xsession
修改xrdp運(yùn)行端口,防止與Windows11自帶的xrdp服務(wù)端口沖突
sudo vim /etc/xrdp/xrdp.ini
修改xrdp的配置文件,把port從3389修改為任意未被占用的端口,避免和本機(jī)沖突
sudo echo xfce4-session >~/.xsession
sudo service xrdp restart

sudo apt install net-tools
ip route | grep default | awk '{print $3}'

install bcbisonbuild-essentialccachecurlflexg++-multilibgcc-multilibgitgit-lfsgnupggperfimagemagick
lib32readline-dev lib32z1-dev libelf-dev liblz4-tool libncurses5 libncurses5-dev
libssl-dev libxml2 libxml2-utils lzop pngcrush rsync
schedtool squashfs-tools xsltproc
zip zlib1g-dev

sudo ufw allow 33891
打開遠(yuǎn)程桌面鏈接
mstsc
使用Windows自帶的遠(yuǎn)程控制進(jìn)行連接
localhost:33891




wsl --shutdown
wsl -u root
sudo /etc/init.d/xrdp start
或
sudo service xrdp restart



sudo add-apt-repository ppa:maarten-fonville/android-studio

sudo apt install android-studio
sudo apt install openjdk-8-jdk
sudo apt install openjdk-11-jdk

sudo apt install -y ubuntu-desktop xrdp gnome-software gnome-tweaks gnome-shell-extensions
git clone https://github.com/DamionGans/ubuntu-wsl2-systemd-script.git
cd ubuntu-wsl2-systemd-script/
bash ubuntu-wsl2-systemd-script.sh

exec bash



啟動(dòng)XRDP服務(wù)
//關(guān)閉WSL
wsl --shutdown
wsl -u root
//由于WSL2里面不能用systemd,所以需要手動(dòng)啟動(dòng)
sudo /etc/init.d/xrdp start

安裝中文輸入法(需要在WSL Ubuntu20.04 GUI圖形界面中操作)
(1).卸載IBus輸入法框架
Ubuntu內(nèi)置了IBus輸入法框架,與fcitx沖突,需要事先卸載
sudoaptremoveibus*
(2).安裝所需要的軟件包
sudoaptinstalldbus-x11fcitxim-configfcitx-sunpinyinfcitx-table-wubi
(3).安裝后需要重啟一次
wsl --shutdown
wsl -u root
sudo /etc/init.d/xrdp start
(4).配置輸入法框架
fcitx-config-gtk3
安裝搜狗輸入法
https://shurufa.sogou.com/
-
源碼
+關(guān)注
關(guān)注
8文章
665瀏覽量
30009 -
Ubuntu
+關(guān)注
關(guān)注
5文章
577瀏覽量
30601 -
Windows11
+關(guān)注
關(guān)注
0文章
60瀏覽量
4547
原文標(biāo)題:Windows11上WSL之Ubuntu20.04搭建Android系統(tǒng)源碼編譯環(huán)境
文章出處:【微信號:哆啦安全,微信公眾號:哆啦安全】歡迎添加關(guān)注!文章轉(zhuǎn)載請注明出處。
發(fā)布評論請先 登錄
相關(guān)推薦
【昉·星光 2 高性能RISC-V單板計(jì)算機(jī)體驗(yàn)】+搭建編譯環(huán)境編譯

迅為RK3588開發(fā)板實(shí)時(shí)系統(tǒng)編譯-Preemption系統(tǒng)/ Xenomai系統(tǒng)編譯-獲取Linux源碼包
Wi-Fi loT Windows10(2004)+WSL2 +Ubuntu 20.04 環(huán)境搭建
使用WSL搭建鴻蒙 IOT最方便的編譯環(huán)境
【米爾MYS-8MMX開發(fā)板免費(fèi)試用】+2.windows10+wsl2方式搭建ubuntu20.04開發(fā)環(huán)境
Ubuntu20.04LTS2.ESP-IDF3.micropython操作步驟
搭建Windows+Ubuntu混合開發(fā)環(huán)境
【HD-G2UL-EVM開發(fā)板體驗(yàn)】基于WIN11+WSL2+UBUNTU搭建C開發(fā)環(huán)境-Helloworld+蜂鳴器測試程序
iTOP3588開發(fā)板-編譯Linux源碼包-獲取Linux源碼包
為什么無法在ubuntu20.04上使用flex builder構(gòu)建tsntool?
【開鴻智谷NiobeU4開發(fā)板免費(fèi)試用體驗(yàn)】開鴻智谷NiobeU4環(huán)境搭建及編譯下載測試
如何制作ubuntu20.04的文件系統(tǒng)
【XR806開發(fā)板試用】通過http請求從心知天氣網(wǎng)獲取天氣預(yù)報(bào)信息

【北京迅為】iTOP-LS2K0500開發(fā)板快速使用編譯環(huán)境ubuntu20.04第一章加載迅為提供 Ubuntu20.04

評論