ubuntu 打印git邮箱_win 10配置Ubuntu子系统—可以考虑放弃VMware了
目錄:
win10安裝Ubuntu子系統(tǒng)
1.微軟商店下載
2.更換源并更新系統(tǒng)
3.子系統(tǒng)安裝桌面環(huán)境并實(shí)現(xiàn)遠(yuǎn)程連接
(1)X-Windows介紹
(2)配置X-Windows連接Ubuntu
(3)Ubuntu安裝桌面環(huán)境
4.子系統(tǒng)Ubuntu安裝mysql
5.WSL Ubuntu配置ssh
windows 10安裝Ubuntu子系統(tǒng)
1.首先到微軟商店下載
下載地址:https://aka.ms/wslstore
2.更換源并更新系統(tǒng)
root@Lanever-PC:~#?uname?-aLinux?Lanever-PC?4.4.0-18362-Microsoft?#476-Microsoft?Fri?Nov?01?16:53:00?PST?2019?x86_64?x86_64?x86_64?GNU/Linuxroot@Lanever-PC:~#?lsb_release?-a???#顯示LSB和特定版本的所有信息No?LSB?modules?are?available.Distributor?ID:?UbuntuDescription:????Ubuntu?18.04.2?LTSRelease:????????18.04Codename:???????bionicroot@Lanever-PC:~#?cp?/etc/apt/sources.list?/etc/apt/sources.list.bak???#備份源root@Lanever-PC:~#?vim?/etc/apt/sources.list#?阿里源deb?http://mirrors.aliyun.com/ubuntu/?bionic?main?restricted?universe?multiversedeb-src?http://mirrors.aliyun.com/ubuntu/?bionic?main?restricted?universe?multiversedeb?http://mirrors.aliyun.com/ubuntu/?bionic-security?main?restricted?universe?multiversedeb-src?http://mirrors.aliyun.com/ubuntu/?bionic-security?main?restricted?universe?multiversedeb?http://mirrors.aliyun.com/ubuntu/?bionic-updates?main?restricted?universe?multiversedeb-src?http://mirrors.aliyun.com/ubuntu/?bionic-updates?main?restricted?universe?multiversedeb?http://mirrors.aliyun.com/ubuntu/?bionic-backports?main?restricted?universe?multiversedeb-src?http://mirrors.aliyun.com/ubuntu/?bionic-backports?main?restricted?universe?multiversedeb?http://mirrors.aliyun.com/ubuntu/?bionic-proposed?main?restricted?universe?multiversedeb-src?http://mirrors.aliyun.com/ubuntu/?bionic-proposed?main?restricted?universe?multiversedeb?http://mirrors.aliyun.com/ubuntu/?xenial?main?restricted?universe?multiversedeb?http://mirrors.aliyun.com/ubuntu/?xenial-security?main?restricted?universe?multiversedeb?http://mirrors.aliyun.com/ubuntu/?xenial-updates?main?restricted?universe?multiversedeb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse#?清華源deb?https://mirrors.tuna.tsinghua.edu.cn/ubuntu/?bionic?main?restricted?universe?multiverse#deb-src?https://mirrors.tuna.tsinghua.edu.cn/ubuntu/?bionic?main?restricted?universe?multiversedeb?https://mirrors.tuna.tsinghua.edu.cn/ubuntu/?bionic-updates?main?restricted?universe?multiverse#deb-src?https://mirrors.tuna.tsinghua.edu.cn/ubuntu/?bionic-updates?main?restricted?universe?multiversedeb?https://mirrors.tuna.tsinghua.edu.cn/ubuntu/?bionic-backports?main?restricted?universe?multiverse#deb-src?https://mirrors.tuna.tsinghua.edu.cn/ubuntu/?bionic-backports?main?restricted?universe?multiversedeb?https://mirrors.tuna.tsinghua.edu.cn/ubuntu/?bionic-security?main?restricted?universe?multiverse#deb-src?https://mirrors.tuna.tsinghua.edu.cn/ubuntu/?bionic-security?main?restricted?universe?multiverseroot@Lanever-PC:~# apt-get update && apt-get upgrade -yUbuntu 20.04 LTS國(guó)內(nèi)適用源:
root@afeicomputer:~#?cat?/etc/apt/sources.list#?阿里源deb?http://mirrors.aliyun.com/ubuntu/?bionic?main?restricted?universe?multiversedeb-src?http://mirrors.aliyun.com/ubuntu/?bionic?main?restricted?universe?multiversedeb?http://mirrors.aliyun.com/ubuntu/?xenial?main?restricted?universe?multiverse#?中科大deb?https://mirrors.ustc.edu.cn/ubuntu/?bionic?main?restricted?universe?multiversedeb-src?https://mirrors.ustc.edu.cn/ubuntu/?bionic?main?restricted?universe?multiverseroot@afeicomputer:~#3.子系統(tǒng)安裝桌面環(huán)境并實(shí)現(xiàn)遠(yuǎn)程連接
(1)X-Windows介紹
?Windows X服務(wù)器基于xorg git源(例如xming或cygwin的xwin),但使用Visual C ++ 2012 Express Edition進(jìn)行編譯。源代碼也可以使用VS2008,VS2008 Express Edition和VS2010 Express Edition進(jìn)行編譯,盡管當(dāng)前項(xiàng)目和makefile不再完全兼容。
?從1.14.3.0開始的版本不再與Windows XP兼容。
X-Windows下載地址:
? ? ? ? ? ? ? ? ?https://sourceforge.net/projects/vcxsrv/
(2)配置X-Windows連接Ubuntu
可自行選擇桌面,選擇多桌面或者全屏桌面,Display number設(shè)置成0
其他的保持默認(rèn)就行
(3)Ubuntu安裝桌面環(huán)境
root@Lanever-PC:~# apt-get install ubuntu-desktop unity compizconfig-settings-manager -y啟動(dòng)安裝的X-Windows:
root@Lanever-PC:~# export DISPLAY=localhost:0root@Lanever-PC:~# ccsmcompizconfig - Info: Backend : inicompizconfig - Info: Integration : truecompizconfig - Info: Profile : defaultLoading icons...會(huì)彈出ccsm的配置界面,勾選需要的Desktop組件(一般只需要勾選Desktop中的Ubuntu Unity Plugin即可,其它默認(rèn)就好)
配置完成關(guān)閉ccsm
啟動(dòng)compiz
root@Lanever-PC:~# compizcompiz (core) - Info: Loading plugin: corecompiz (core) - Info: Starting plugin: corecompiz (core) - Info: Loading plugin: ccpcompiz (core) - Info: Starting plugin: ccpcompizconfig - Info: Backend : inicompizconfig - Info: Integration : truecompizconfig - Info: Profile : default4.子系統(tǒng)Ubuntu安裝mysql
root@afeicomputer:/mnt/d/Linux/Linux software/ubuntu# wget https://dev.mysql.com/get/mysql-apt-config_0.8.12-1_all.deb --no-check-certificateroot@afeicomputer:/mnt/d/Linux/Linux software/ubuntu# dpkg -i mysql-apt-config_0.8.12-1_all.deb按Tab鍵選擇"ok“,繼續(xù)安裝:
選擇需要安裝的版本:
root@afeicomputer:/mnt/d/Linux/Linux software/ubuntu# apt-get update && apt-get install lsb-release -y #更新添加的mysql源root@afeicomputer:/mnt/d/Linux/Linux software/ubuntu# apt -y install mysql-server設(shè)置密碼:
root@afeicomputer:/mnt/d/Linux/Linux software/ubuntu# apt policy mysql-server #查看軟件包是否已安裝mysql-server: Installed: 8.0.18-1ubuntu18.04 Candidate: 8.0.18-1ubuntu18.04...啟動(dòng)mysql:發(fā)現(xiàn)在子系統(tǒng)Ubuntu中不能用systemctl啟動(dòng)mysql,并且在/etc/init.d下也沒有mysql啟動(dòng)腳本。可用如下方式啟動(dòng):
root@afeicomputer:~# mysqld --user=root #以root用戶啟動(dòng)... #并且這時(shí)cmd無法結(jié)束掉查看進(jìn)程:
root@afeicomputer:~# netstat -nltup #服務(wù)中無法看到,它以進(jìn)程形式存在Active Internet connections (only servers)Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program nameroot@afeicomputer:~# ps -aux |grep "mysql"root 901 0.2 4.8 2740728 401096 ? Sl 11:06 0:00 mysqld --user=rootroot 963 0.0 0.0 14804 1200 tty1 S 11:12 0:00 grep --color=auto mysqlroot@afeicomputer:~# mysql -uroot -pcl123456mysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 8Server version: 8.0.18 MySQL Community Server - GPL...mysql> \qByeroot@afeicomputer:~#可以在Windows的Cmd中查看mysql端口:
C:\Users\Administrator>netstat -ano |findstr 3306 TCP 0.0.0.0:3306 0.0.0.0:0 LISTENING 684 TCP 0.0.0.0:33060 0.0.0.0:0 LISTENING 684關(guān)閉mysql:
root@afeicomputer:~# kill -9 901 #結(jié)束mysql進(jìn)程有時(shí)mysqld --user=root可能會(huì)啟動(dòng)失敗,可用mysqld_safe --user=root啟動(dòng):
root@afeicomputer:~# mkdir /var/run/mysqldroot@afeicomputer:~# chown mysql:mysql /var/run/mysqld/root@afeicomputer:~# mysqld_safe --user=root2020-01-11T02:23:33.918541Z mysqld_safe Logging to '/var/log/mysql/error.log'.2020-01-11T02:23:34.050317Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql5.WSL Ubuntu配置ssh
root@afeicomputer:~# dpkg -l |grep "ssh-server"ii openssh-server 1:8.2p1-4 amd64 secure shell (SSH) server, for secure access from remote machinesroot@afeicomputer:~# vim /etc/ssh/sshd_config #修改配置文件...34 PermitRootLogin yes... 58 PasswordAuthentication yes...root@afeicomputer:~# ssh-keygen -Aroot@afeicomputer:~# service ssh startroot@afeicomputer:~# service ssh --full-restart * Stopping OpenBSD Secure Shell server sshd [ OK ] * Starting OpenBSD Secure Shell server sshd?????????????????????????????????????????????????????????? [ OK ]
root@afeicomputer:~# ps -e |grep ssh #查看服務(wù)是否啟動(dòng) 517 ? 00:00:00 sshdroot@afeicomputer:~# apt install net-tools -yroot@afeicomputer:~# ifconfig wifi0 |grep 'inet' |awk '{print $2}' |tr -d "addr" |sed -n '1p' #檢索出IP192.168.1.2Xshell連接測(cè)試:
更多文章請(qǐng)前往:https://blog.csdn.net/qq_41490561
更多精彩內(nèi)容請(qǐng)關(guān)注我們往期推薦
國(guó)慶中秋雙節(jié)過后,回歸
2020 HVV小結(jié)—來年再戰(zhàn)
巧用社工獲取“對(duì)象”IP和地理位置
總結(jié)
以上是生活随笔為你收集整理的ubuntu 打印git邮箱_win 10配置Ubuntu子系统—可以考虑放弃VMware了的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Java.lang.Class类 isA
- 下一篇: ubuntu18.04安装pycharm