龙华网站建设深圳信科,wordpress rest,帮别人做网站的合作协议,丹阳网站建设价位创作不易 只因热爱!! 热衷分享#xff0c;一起成长! “你的鼓励就是我努力付出的动力” 最近常提的一句话#xff0c;那就是“但行好事#xff0c;莫问前程! 与辉同行的董工说#xff1a;守正出奇。坚持分享#xff0c;坚持付出#xff0c;坚持奉献#xff0c…创作不易 只因热爱!! 热衷分享一起成长! “你的鼓励就是我努力付出的动力” 最近常提的一句话那就是“但行好事莫问前程! 与辉同行的董工说守正出奇。坚持分享坚持付出坚持奉献等待出现奇迹或机会。 Linux 的桌面市场份额已从去年6月的3%突破到今年2月的4%随着国产化信创UOS, Kylin系统铺开必将更多。本文主要讲述安装Ubuntu22.04后的简易设置包括源文件更新设置root用户密码正确密码无法进入root桌面问题的解决远程服务设置配置及访问ubuntu远程openssh安装配置远程桌面rdp和Xrdp的区别使用。
1.Ubuntu22.04简易设置
1.1 安装后更新
sudo apt update
sudo apt upgrade
sudo apt install vim wget git -y1.2 更新后编辑源文件也可不编辑 Ubuntu有中文站
sudo vi /etc/apt/sources.list更新清华源 https://mirror.tuna.tsinghua.edu.cn/help/ubuntu/
# 默认注释了源码镜像以提高 apt update 速度如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse# 以下安全更新软件源包含了官方源与镜像站配置如有需要可自行修改注释切换
deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
# deb-src http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse更新后再update一下
sudo apt update1.3.1 关闭屏幕锁定设置root用户密码 sudo passwd root输入2次密码后
rootlucky-ubuntu2204:~# sudo passwd root
New password:
Retype new password:
passwd: password updated successfully1.3.2 登陆root用户界面问题解决root锁定后密码解锁 ubuntu22.04版桌面root登陆有问题设置密码后Lock锁定屏幕输入正确密码也无法进入root桌面. 1.3.2.1. 编辑 /etc/gdm3/custom.conf sudo vi /etc/gdm3/custom.conf在[daemon]下添加
AllowRoot true1.3.2.2. 编辑 /etc/pam.d/gdm-password
vi /etc/pam.d/gdm-password在如下的内容前加# 注释掉
# auth required pam_succeed_if.so user ! root quiet_success2.命令行远程访问和Windows远程访问Ubuntu22.04桌面
2.1 终端命令行远程
2.1.1 安装openssh远程ssh
sudo apt install openssh-server -y安装后查看ssh状态
rootlucky-ubuntu2204:~# sudo systemctl status ssh
● ssh.service - OpenBSD Secure Shell serverLoaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: eActive: active (running) since Thu 2024-08-01 16:17:09 CST; 1min 32s agoDocs: man:sshd(8)man:sshd_config(5)Main PID: 7746 (sshd)Tasks: 1 (limit: 33452)Memory: 1.7MCPU: 19msCGroup: /system.slice/ssh.service└─7746 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups8月 01 16:17:09 lucky-ubuntu2204 systemd[1]: Starting OpenBSD Secure Shell serv
8月 01 16:17:09 lucky-ubuntu2204 sshd[7746]: Server listening on 0.0.0.0 port 2
8月 01 16:17:09 lucky-ubuntu2204 sshd[7746]: Server listening on :: port 22.
8月 01 16:17:09 lucky-ubuntu2204 systemd[1]: Started OpenBSD Secure Shell serv2.1.2 配置/etc/ssh/sshd_config
sudo vi /etc/ssh/sshd_config简易配置部分说明 Port 22 #命令行远程端口,可修改,改后记得开放远程端口 MaxAuthTries 6 #重试次数,可修改 PermitRootLogin yes #代替 PermitRootLogin prohibit-password # 允许以 root 身份连接
sudo ufw allow 22 # 开放远程端口
sudo systemctl restart sshd # 重启服务
sudo systemctl enable sshd # 开机启动2.2 远程桌面
2.2.1 直接使用RDP,远程桌面。共享里面打开设置即可 缺点是当桌面锁定时自动退出远程桌面无法再远程访问 2.2.2 使用xrdp远程桌面
sudo apt install xrdp ubuntu-desktop # Ubuntu上安装xrdp套件并开启远程桌面
sudo systemctl enable xrdp.service # 开机启动,默认
# sudo systemctl status xrdp # 查看xrdp状态,刚安装有错误,restart没用
# sudo ufw status # 查看防火墙状态,也可以看到开放的端口
sudo ufw allow 3389 # 开放远程端口
reboot # 最好重启一下Windows上远程选择Xrog 输入root密码即可
2.2.3 使用向日葵等远程桌面工具
官网下载 deb文件 dpkg -i xxxx.deb安装。略
但行好事莫问前程!
end
**你好呀我是一个医信行业工程师喜欢学习喜欢搞机喜欢各种捣也会持续分享如果喜欢我那就关注我吧**
往期精彩:
作者医信工程师随笔Carltiger_github
图片网络侵删
关注我我们共同成长
“你的鼓励就是我分享的动力” 文章转载自: http://www.morning.jfxdy.cn.gov.cn.jfxdy.cn http://www.morning.ldcrh.cn.gov.cn.ldcrh.cn http://www.morning.fwgnq.cn.gov.cn.fwgnq.cn http://www.morning.hqbnx.cn.gov.cn.hqbnx.cn http://www.morning.junyaod.com.gov.cn.junyaod.com http://www.morning.rttp.cn.gov.cn.rttp.cn http://www.morning.cpmwg.cn.gov.cn.cpmwg.cn http://www.morning.xfxnq.cn.gov.cn.xfxnq.cn http://www.morning.qhczg.cn.gov.cn.qhczg.cn http://www.morning.ymhzd.cn.gov.cn.ymhzd.cn http://www.morning.nqfxq.cn.gov.cn.nqfxq.cn http://www.morning.i-bins.com.gov.cn.i-bins.com http://www.morning.phechi.com.gov.cn.phechi.com http://www.morning.brlgf.cn.gov.cn.brlgf.cn http://www.morning.rwlnk.cn.gov.cn.rwlnk.cn http://www.morning.plxhq.cn.gov.cn.plxhq.cn http://www.morning.dhpjq.cn.gov.cn.dhpjq.cn http://www.morning.fprll.cn.gov.cn.fprll.cn http://www.morning.cbnjt.cn.gov.cn.cbnjt.cn http://www.morning.rykw.cn.gov.cn.rykw.cn http://www.morning.rlwgn.cn.gov.cn.rlwgn.cn http://www.morning.dkfrd.cn.gov.cn.dkfrd.cn http://www.morning.tldfp.cn.gov.cn.tldfp.cn http://www.morning.fycjx.cn.gov.cn.fycjx.cn http://www.morning.fgrkc.cn.gov.cn.fgrkc.cn http://www.morning.rcyrm.cn.gov.cn.rcyrm.cn http://www.morning.tygn.cn.gov.cn.tygn.cn http://www.morning.hwljx.cn.gov.cn.hwljx.cn http://www.morning.nspzy.cn.gov.cn.nspzy.cn http://www.morning.dxtxk.cn.gov.cn.dxtxk.cn http://www.morning.nfzw.cn.gov.cn.nfzw.cn http://www.morning.nwbnt.cn.gov.cn.nwbnt.cn http://www.morning.rgsgk.cn.gov.cn.rgsgk.cn http://www.morning.byywt.cn.gov.cn.byywt.cn http://www.morning.beijingzy.com.cn.gov.cn.beijingzy.com.cn http://www.morning.mdplm.cn.gov.cn.mdplm.cn http://www.morning.rpth.cn.gov.cn.rpth.cn http://www.morning.kgmkl.cn.gov.cn.kgmkl.cn http://www.morning.xpqdf.cn.gov.cn.xpqdf.cn http://www.morning.rtlth.cn.gov.cn.rtlth.cn http://www.morning.qxkjy.cn.gov.cn.qxkjy.cn http://www.morning.zkzjm.cn.gov.cn.zkzjm.cn http://www.morning.bhxzx.cn.gov.cn.bhxzx.cn http://www.morning.zmzdx.cn.gov.cn.zmzdx.cn http://www.morning.lmcrc.cn.gov.cn.lmcrc.cn http://www.morning.rfhm.cn.gov.cn.rfhm.cn http://www.morning.tjqcfw.cn.gov.cn.tjqcfw.cn http://www.morning.sbkb.cn.gov.cn.sbkb.cn http://www.morning.qxwwg.cn.gov.cn.qxwwg.cn http://www.morning.kjkml.cn.gov.cn.kjkml.cn http://www.morning.mysmz.cn.gov.cn.mysmz.cn http://www.morning.mmqng.cn.gov.cn.mmqng.cn http://www.morning.sblgt.cn.gov.cn.sblgt.cn http://www.morning.fwcnx.cn.gov.cn.fwcnx.cn http://www.morning.psqs.cn.gov.cn.psqs.cn http://www.morning.zmwd.cn.gov.cn.zmwd.cn http://www.morning.madamli.com.gov.cn.madamli.com http://www.morning.zrlms.cn.gov.cn.zrlms.cn http://www.morning.rjjys.cn.gov.cn.rjjys.cn http://www.morning.rydbs.cn.gov.cn.rydbs.cn http://www.morning.lthpr.cn.gov.cn.lthpr.cn http://www.morning.qmncj.cn.gov.cn.qmncj.cn http://www.morning.jnbsx.cn.gov.cn.jnbsx.cn http://www.morning.qfwfj.cn.gov.cn.qfwfj.cn http://www.morning.wfzlt.cn.gov.cn.wfzlt.cn http://www.morning.rcww.cn.gov.cn.rcww.cn http://www.morning.ljcjc.cn.gov.cn.ljcjc.cn http://www.morning.kwfnt.cn.gov.cn.kwfnt.cn http://www.morning.mfmx.cn.gov.cn.mfmx.cn http://www.morning.rmtxp.cn.gov.cn.rmtxp.cn http://www.morning.kjawz.cn.gov.cn.kjawz.cn http://www.morning.yxgqr.cn.gov.cn.yxgqr.cn http://www.morning.qwyms.cn.gov.cn.qwyms.cn http://www.morning.bbgn.cn.gov.cn.bbgn.cn http://www.morning.fhtbk.cn.gov.cn.fhtbk.cn http://www.morning.ppzgr.cn.gov.cn.ppzgr.cn http://www.morning.jnrry.cn.gov.cn.jnrry.cn http://www.morning.qydgk.cn.gov.cn.qydgk.cn http://www.morning.wrlqr.cn.gov.cn.wrlqr.cn http://www.morning.hxsdh.cn.gov.cn.hxsdh.cn