ubuntu版本可归为两类,桌面版和服务器版。
服务器版也可以安装图形化界面,命令如下:
1 2 | sudo apt update sudo apt install ubuntu-desktop |
---|
1 2 3 4 5 6 7 8 | # 查看是否安装openssh dpkg -l|grep -i openssh-server # 如果没有安装 sudo apt install openssh-server # 确认 systemctl status sshd sudo apt install net-tools netstat -luntp|grep -i 22 |
---|
ubuntu一般被远程连接是通过ssh命令行,也可以通过vnc,rdp来连接图形化桌面。windows远程桌面采用的rdp协议,连接效果极佳。
1 2 3 4 5 6 7 8 9 10 11 | #执行系统更新 sudo apt update #安装xrdp sudo apt install xrdp #启动它 sudo systemctl start xrdp #开机启用 sudo systemctl enable xrdp #检查状态 sudo systemctl status xrdp |
---|
1 2 3 4 5 6 7 | sudo adduser xrdp ssl-cert sudo systemctl restart xrdp #注意防火墙放行3389端口 sudo ufw allow from any to any port 3389 proto tcp #查看ubuntu系统ip ip a |
---|