ubuntu系统配置远程登陆、clash、图像化配置

0、IP地址查看

ubuntu查看本机IP地址,先安装net-tools。并且记录你的ip地址xxx.xxx.xxx.xxx

sudo apt install net-tools
ifconfig

在win+r打开输入cmd,如果在同一个局域网应该是可以ping通的

ping xxx.xxx.xxx.xxx

1、ssh连接和sftp连接

ubuntu 安装ssh 服务

sudo apt-get install ssh
service ssh start

win中可以打开mobax,通过ip进行访问了

2、固定自己的IP

通常情况下动态分配ip,每次重启后ip都会变化,因此采用设置固定ip。首先通过

ifconfig和route -n获得自己的ip和网关

cd /etc/netplan/
ls
sudo chmod 777 01-network-manager-all.yaml
vim 01-network-manager-all.yaml
network:
  version: 2
  renderer: NetworkManager
  ethernets:
    ens33:   #配置的网卡名称
      dhcp4: no    #dhcp4关闭
      dhcp6: no    #dhcp6关闭
      addresses: [你自己的ip/24]   #设置本机IP及掩码
      gateway4: 你自己的网关   #设置网关
      nameservers:
        addresses: [114.114.114.114, 8.8.8.8]   #设置DNS
sudo netplan apply

发现一个问题:如果需要校园认证的网络,如果固定了就没法连接服务器了。

3、win10远程桌面,有的时候希望有图形化页面

sudo apt-get install xorg
sudo apt-get install xserver-xorg-core
sudo apt-get install xorgxrdp

sudo apt install xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils

sudo apt install xrdp
sudo systemctl status xrdp
sudo systemctl restart xrdp
sudo sed -i.bak '/fi/a #xrdp multiple users configuration \n xfce-session \n' /etc/xrdp/startwm.sh
echo xfce4-session > ~/.xsession
sudo systemctl restart xrdp

打开win10 的远程桌面输入ip和用户名,连接后输入密码就可以看到图形化页面

参考:

https://www.jianshu.com/p/8848cd68d45b

https://blog.csdn.net/qq_19734597/article/details/104087091

https://blog.csdn.net/LisaCpolar/article/details/126751019

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值