目录

一、前言

二、具体解决方法

第一步:切换root用户至自己账号

第二步:重新安装xrdp

第三步:重新配置端口并启动xrdp

第四步:打开远程连接窗口

第五步:点击连接,开始进入Linux子系统​编辑

第六步:切换到的账户的输入密码,并点击认证

第七步:成功进入Ubuntu20.04

三、尾言


一、前言

由于研究方向是无人机路径规划需要用到ros机器人操作系统,我就在Win11系统的电脑上安装了一个Ubuntu20.04LTS版本的Linux子系统。之后我在打开linux子系统的情况下把自己的win11主系统给关机了,后来再把电脑开机通过远程桌面连接去访问Linux子系统时出现了下面的错误:

System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: 主机关闭

二、具体解决方法

按照下面的操作就行了:

第一步:切换root用户至自己账号

自己账号就是安装ubuntu20.04时自己创建的那个用户账号

运行命令:

root@LAPTOP-S0G7C3PS:~# su renlinchao

现象:

Sleeping for 1 second to let systemd settle
Welcome to Ubuntu 20.04.5 LTS (GNU/Linux 5.10.16.3-microsoft-standard-WSL2 x86_64)* Documentation:  https://help.ubuntu.com* Management:     https://landscape.canonical.com* Support:        https://ubuntu.com/advantageSystem information as of 2022年 10月 15日 星期六 19:28:27 CSTSystem load:  0.0                Processes:             44Usage of /:   4.8% of 250.98GB   Users logged in:       0Memory usage: 5%                 IPv4 address for eth0: 172.27.54.91Swap usage:   0%* Super-optimized for small spaces - read how we shrank the memoryfootprint of MicroK8s to make it the smallest full K8s around.https://ubuntu.com/blog/microk8s-memory-optimisation0 更新可以立即应用。

第二步:重新安装xrdp

sudo apt-get install xrdp

现象:

[sudo] renlinchao 的密码:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
xrdp 已经是最新版 (0.9.12-1)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。

第三步:重新配置端口并启动xrdp

运行命令:

sudo sed -i 's/3389/3390/g' /etc/xrdp/xrdp.ini
echo "gnome-session" > ~/.xsession
sudo systemctl restart xrdp
sudo systemctl status xrdp

现象:

● xrdp.service - xrdp daemonLoaded: loaded (/lib/systemd/system/xrdp.service; enabled; vendor preset: enabled)Active: active (running) since Sat 2022-10-15 20:55:15 CST; 8s agoDocs: man:xrdp(8)man:xrdp.ini(5)Process: 570 ExecStartPre=/bin/sh /usr/share/xrdp/socksetup (code=exited, status=0/SUCCESS)Process: 578 ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS (code=exited, status=0/SUCCESS)Main PID: 579 (xrdp)Tasks: 1 (limit: 4634)Memory: 1.2MCGroup: /system.slice/xrdp.service└─579 /usr/sbin/xrdpOct 15 20:55:14 LAPTOP-S0G7C3PS xrdp[578]: (578)(139874801551168)[INFO ] address [0.0.0.0] port [3390] mode 1
Oct 15 20:55:14 LAPTOP-S0G7C3PS xrdp[578]: (578)(139874801551168)[INFO ] listening to port 3390 on 0.0.0.0
Oct 15 20:55:14 LAPTOP-S0G7C3PS xrdp[578]: (578)(139874801551168)[INFO ] xrdp_listen_pp done
Oct 15 20:55:14 LAPTOP-S0G7C3PS xrdp[578]: (578)(139874801551168)[DEBUG] Closed socket 7 (AF_INET6 :: port 3390)
Oct 15 20:55:14 LAPTOP-S0G7C3PS systemd[1]: xrdp.service: Can't open PID file /run/xrdp/xrdp.pid (yet?) after start: 不>Oct 15 20:55:15 LAPTOP-S0G7C3PS systemd[1]: Started xrdp daemon.
Oct 15 20:55:16 LAPTOP-S0G7C3PS xrdp[579]: (579)(139874801551168)[INFO ] starting xrdp with pid 579
Oct 15 20:55:16 LAPTOP-S0G7C3PS xrdp[579]: (579)(139874801551168)[INFO ] address [0.0.0.0] port [3390] mode 1
Oct 15 20:55:16 LAPTOP-S0G7C3PS xrdp[579]: (579)(139874801551168)[INFO ] listening to port 3390 on 0.0.0.0
Oct 15 20:55:16 LAPTOP-S0G7C3PS xrdp[579]: (579)(139874801551168)[INFO ] xrdp_listen_pp done
lines 1-23/23 (END)...skipping...
● xrdp.service - xrdp daemonLoaded: loaded (/lib/systemd/system/xrdp.service; enabled; vendor preset: enabled)Active: active (running) since Sat 2022-10-15 20:55:15 CST; 8s agoDocs: man:xrdp(8)man:xrdp.ini(5)Process: 570 ExecStartPre=/bin/sh /usr/share/xrdp/socksetup (code=exited, status=0/SUCCESS)Process: 578 ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS (code=exited, status=0/SUCCESS)Main PID: 579 (xrdp)Tasks: 1 (limit: 4634)Memory: 1.2MCGroup: /system.slice/xrdp.service└─579 /usr/sbin/xrdpOct 15 20:55:14 LAPTOP-S0G7C3PS xrdp[578]: (578)(139874801551168)[INFO ] address [0.0.0.0] port [3390] mode 1
Oct 15 20:55:14 LAPTOP-S0G7C3PS xrdp[578]: (578)(139874801551168)[INFO ] listening to port 3390 on 0.0.0.0
Oct 15 20:55:14 LAPTOP-S0G7C3PS xrdp[578]: (578)(139874801551168)[INFO ] xrdp_listen_pp done
Oct 15 20:55:14 LAPTOP-S0G7C3PS xrdp[578]: (578)(139874801551168)[DEBUG] Closed socket 7 (AF_INET6 :: port 3390)
Oct 15 20:55:14 LAPTOP-S0G7C3PS systemd[1]: xrdp.service: Can't open PID file /run/xrdp/xrdp.pid (yet?) after start: 不 允许的操作
Oct 15 20:55:15 LAPTOP-S0G7C3PS systemd[1]: Started xrdp daemon.
Oct 15 20:55:16 LAPTOP-S0G7C3PS xrdp[579]: (579)(139874801551168)[INFO ] starting xrdp with pid 579
Oct 15 20:55:16 LAPTOP-S0G7C3PS xrdp[579]: (579)(139874801551168)[INFO ] address [0.0.0.0] port [3390] mode 1
Oct 15 20:55:16 LAPTOP-S0G7C3PS xrdp[579]: (579)(139874801551168)[INFO ] listening to port 3390 on 0.0.0.0
Oct 15 20:55:16 LAPTOP-S0G7C3PS xrdp[579]: (579)(139874801551168)[INFO ] xrdp_listen_pp done

第四步:打开远程连接窗口

第五步:点击连接,开始进入Linux子系统

第六步:切换到的账户的输入密码,并点击认证

第七步:成功进入Ubuntu20.04

三、尾言

尝试新事物重新各种各样的错误是肯定的,出现某种错误的原因也是多种多样的,如果上面的流程没有解决你的问题可以下面留言或者直接加我微信问我都是可以的,都是免费的,学技术问人不丢人,关键是要知道去学,不要让自己的大学四年或者研究生三年白白浪费了。

win11安装的Ubuntu20.04子系统出现System has not been booted with systemd as init system (PID 1)问题的解决流程相关推荐

  1. System has not been booted with systemd as init system (PID 1). Can‘t operat

    原因 docker run -it centos /bash/bin 在容器中安装服务 systemctl start xxx.service 报错 System has not been boote ...

  2. WSL 错误 System has not been booted with systemd as init system (PID 1). Can‘t operate

    描述 项目 描述 操作系统 Windows 10 专业版 版本 WSL 2 前情 在 适用与 Linux 的 Windows 的子系统(WSL) 默认情况下是无法使用 systemctl 命令,使用该 ...

  3. 排障集锦:九九八十一难之第十八难!-----System has not been booted with systemd as init system (PID 1). Can‘t operat

    报错现象如下 System has not been booted with systemd as init system (PID 1). Can't operate. Failed to conn ...

  4. window10下WSL使用Ubuntu报错: System has not been booted with systemd as init system (PID 1). Can‘t operat

    用window10下WSL使用Ubuntu来用Docker 当我使用命令sudo systemctl start docker的时候报错: System has not been booted wit ...

  5. docker报错:System has not been booted with systemd as init system (PID 1). Can‘t operate.

    docker使用centos7命令 systemctl 报错 $ systemctl status firewalld System has not been booted with systemd ...

  6. WSL2 安装 Ubuntu-20.04 子系统CUDA(Win10和Win11)

    1.安装WSL的CUDA驱动 驱动下载地址:https://developer.nvidia.com/cuda/wsl 选好你自己的显卡类型 下载完成后直接默认安装就行 2.安装WSL2(使用Ubun ...

  7. 新安装的Ubuntu20.04 5.13上没有WIFI 看这一篇就够了

    近日在电脑上安装了Ubuntu20.04 5.13双系统,进入系统后没有WiFi和蓝牙开启,就这个问题,有如下的解决方案 首先我们想到的问题应该是系统与无线网卡驱动是否匹配,所以如下操作 1查看系统本 ...

  8. win10离线安装WSL2 Ubuntu20.04系统

    虽然微软官方提供了方便的APP Store安装方式,和自动的命令安装方式,单由于国内限制因素,导致官方网速巨慢,而且很不稳定. 这不得不迫使我们探索一种不依赖官方网站的安装方式.步骤如下. 准备 设置 ...

  9. GeekPro 2022安装 win10+ubuntu20.04.4双系统

    参考链接: 1.Win11+Ubuntu20.04双系统安装教程_Jason.WuT的博客-CSDN博客_win11+ubuntu双系统 2.Windows 和 Ubuntu 双系统从安装到卸载_哔哩 ...

最新文章

  1. kettle-核心概念
  2. 呼伦湖国家级自然保护区管理局投放草料保野生黄羊过冬
  3. 二阶声波正演c语言程序_嵌入式开发中的三种程序构架
  4. Qt 第三章 创建主窗口--实现File菜单
  5. VMware卸载虚拟机
  6. gcc a.c 究竟经历了什么
  7. 电脑关机慢是什么原因_为什么电脑无法关机?电脑无法正常关机的解决方案
  8. 收藏:软件开发、软件收藏
  9. (计算机组成原理)第六章总线-第二节:总线仲裁(链式查询,计数器查询、独立请求)
  10. hihoCoder1690 (动态规划)
  11. Linux使用evhttp实现一个简单的HttpServer
  12. 5个让IT开发效率提高200%的工具,最后一个很实用,你用过几个
  13. java静态类是只有一个吗,一个只有“私有最终静态”变量的java类。这是一个好主意吗?...
  14. win7更改计算机名后桌面壁纸,win7系统电脑壁纸自动改变被恶意篡改的解决方法...
  15. 解决“文件或目录损坏且无法读取”的问题
  16. 第06章 软件架构设计 之 软件架构风格
  17. 苹果公司CEO乔布斯演讲的15个秘诀
  18. 睡眠即醒 蓝牙_如果您的Mac从睡眠中随机醒来,请尝试防止蓝牙唤醒功能 | MOS86...
  19. Android——待办事项(ToDoList)
  20. 中小水库中的水情遥测系统如何实现远程监控和自动报警?

热门文章

  1. 红外弱小目标检测之TBC-Net
  2. 未穿厨师服厨师帽穿戴识别检测|明厨亮灶
  3. C++中常对象、常成员函数、常成员变量
  4. python写简单脚本_python写一个最简单的可执行脚本
  5. Zimbra邮件服务器利用XXE漏洞与SSRF完成对目标的文件上传与远程代码执行
  6. Failed to call ThenRnnForward
  7. ★ 数据仓库设计的21条原则
  8. 中国企业流动性市场趋势报告、技术动态创新及市场预测
  9. 整合nagios+cacti+微信、飞信实现网络监控系统报警
  10. c4d渲染测试软件,C4D中阿诺德GPU渲染测试